[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-1233?page=c...
]
Steve Ebersole commented on HHH-1233:
-------------------------------------
The other thing to keep in mind that there are issues with far fewer votes that are
actually far more important (and probably visa-versa as well, true). Votes is only one
criteria I use for ranking.
Allow mixing <union-subclass>and <subclass>
-------------------------------------------
Key: HHH-1233
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-1233
Project: Hibernate3
Issue Type: Improvement
Components: core
Environment: N/A
Reporter: Gunther Schadow
BACKGROUND:
Hibernate allows mixing <subclass> and <joined-subclass> inheritance mappings
but apparently not <subclass> and <union-subclass> mappings, however, this
seems like the most useful combination. Example:
USE CASE:
We may have a hierarchy with very unevenly distributed mass, i.e., some subclasses have
millions of objects, others have only a half-dozen. There may be a lot of different
subclasses of the smaller sort.
Union-subclass seems ideal to work with a dozen different humongous tables, as they can
be placed on different tablespaces and managed differently. However, for the 200 or so
subclasses whith only a dozen objects each, it would be easier to map these into a single
table per sub-hierarchy.
REQUESTED FEATURE:
Therefore it seems fair to suggest that <subclass> mappings should be supported
underneath <union-subclass> mappings. To allow that the <discriminator>
element would have to be handled inside a <union-subclass> element and same for the
discriminator-value attribute. Perhaps one could limit the complexity by requiring that
the outer mapping must be union-subclass and the inner can be subclass but not vica
versa?
WORKAROUNDS:
As the documentation mentions one could just create several independent <class>
hierarchies, thus effectively emulating the first level of union-subclass specializations.
But that would not allow specifying polymorphic associations.
ESTIMATED EFFORT:
It could be difficult to implement support for this. But would like to know whether this
is something that is somewhere on the radar screen for the future.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira