[hibernate-issues] [Hibernate-JIRA] Resolved: (EJB-346) Hibernate is not JPA compliant when using multiple EAGER OneToMany relationships

Emmanuel Bernard (JIRA) noreply at atlassian.com
Mon Mar 24 19:15:33 EDT 2008


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

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 "@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: 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