[hibernate-issues] [Hibernate-JIRA] Resolved: (HHH-3455) Component polymorphism (<subclass> within <component>)

Gail Badner (JIRA) noreply at atlassian.com
Tue Mar 3 23:45:39 EST 2009


     [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3455?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gail Badner resolved HHH-3455.
------------------------------

    Resolution: Duplicate

> Component polymorphism (<subclass> within <component>)
> ------------------------------------------------------
>
>                 Key: HHH-3455
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3455
>             Project: Hibernate Core
>          Issue Type: Improvement
>          Components: core
>            Reporter: Jasper Blues
>
> The following feature request occurs on the Hibernate forums from time to time - it would be especially useful in mapping complex legacy schemas: 
> <class name="Critter">
>     <component name="breathingStrategy" class="BreathingStrategy">
>        
>         <discriminator column="BREATHING_STRATEGY" type="integer" />
>         <subclass name="Lungs" discriminator-value="0" >
>             <set name="alveoli">
>                 <key column="CRITTER_ID" />
>                 <one-to-many class="Alveolus" />
>             </set>
>         </subclass>
>        
>         <subclass name="Gills" discriminator-value="1" >
>             <set name="alveoli">
>                 <key column="CRITTER_ID" />
>                 <one-to-many class="Gill" />
>             </set>
>         </subclass>
>     </component>
> </class> 
> Will a patch that implements this feature be accepted?
> What do you think if there was an option to inherit a discriminator from the owning entity? How about some convention over configuration? By default the discriminator from the owning entity is inherited, unless one is supplied at the component level. 
> Would an equivalent annotation mapping be required? 

-- 
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