[hibernate-issues] [Hibernate-JIRA] Created: (HHH-5965) In JPA 2.0 no way to use SINGLE_TABLE for entity subclass included in associations @OneToMany
Andrea Folli (JIRA)
noreply at atlassian.com
Fri Feb 25 11:24:08 EST 2011
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