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

Paul Benedict (JIRA) noreply at atlassian.com
Tue Mar 3 22:13:39 EST 2009


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3455?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=32548#action_32548 ] 

Paul Benedict commented on HHH-3455:
------------------------------------

This issue should be closed as DUPLICATE in favor of HHH-1910

> 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