[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-1233) Allow mixing <union-subclass>and <subclass>

James Carman (JIRA) noreply at atlassian.com
Mon Jun 4 10:31:04 EDT 2007


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1233?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_27118 ] 

James Carman commented on HHH-1233:
-----------------------------------

This would be a VERY nice feature.  We had an existing schema that we had to split out into individual tables because this wasn't implemented yet.  Please implement this.  

> 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.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the hibernate-issues mailing list