[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-5965) In JPA 2.0 no way to use SINGLE_TABLE for entity subclass included in associations @OneToMany

Gail Badner (JIRA) noreply at atlassian.com
Fri Feb 25 19:53:08 EST 2011


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

Gail Badner commented on HHH-5965:
----------------------------------

Please provide a test case that reproduces your issue.
Thanks,
Gail

> In JPA 2.0 no way to use SINGLE_TABLE for entity subclass included in associations @OneToMany
> ---------------------------------------------------------------------------------------------
>
>                 Key: HHH-5965
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5965
>             Project: Hibernate Core
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 3.6.1
>         Environment: All
>            Reporter: Andrea Folli
>            Priority: Critical
>
> We use SINGLE_TABLE Mapping Strategy to collapse on a single table several Entity Classes sharing a lot of persistent fields.
> When two of these entities are associated to a master entity via @OneToMany and we load the master entity with FetchType.EAGER for the two associations, we get a ClassCastException due to a bad behavoiur of Hibernate..
> In fact it loads for both associtions all the entities associated by FK to the master entity, (regrdless of Discriminator Values).
> We know there is the @ForceDiscriminator annotations, but there is not an equivalento in JPA 2.0 implemenmtation, 
> Please can you reveal your strategy for this issue?

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