]
Emmanuel Bernard resolved EJB-346.
----------------------------------
Resolution: Duplicate
Hibernate is not JPA compliant when using multiple EAGER OneToMany
relationships
--------------------------------------------------------------------------------
Key: EJB-346
URL:
http://opensource.atlassian.com/projects/hibernate/browse/EJB-346
Project: Hibernate Entity Manager
Issue Type: Bug
Affects Versions: 3.3.0.ga
Reporter: Doug Bateman
JPA compatibility is broken when mapping a JPA object with multiple eagerly loaded
one-to-many mappings. Specifically, Hibernate's behavior is as follows:
+ If a JPA persistent object has multiple fields with
"(a)OneToMany(fetch=FetchType.EAGER)" Hibernate throws "HibernateException:
cannot simultaneously fetch multiple bags"
+ This issue is fixed only when the user adds the Hibernate specific annotation
@Fetch(FetchMode.SUBSELECT)
To be JPA compliant, Hibernate must be able to map any JPA compliant object, without
requiring additional Hibernate specific annotations. JPA expressly allows multiple
one-to-many mappings (with the implied assumption that subselects are used by default in
this case).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: