[hibernate-issues] [Hibernate-JIRA] Resolved: (HHH-6593) Fetch joining subelements of a one-to-one or many-to-one association

Gail Badner (JIRA) noreply at atlassian.com
Fri Jan 13 02:58:10 EST 2012


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

Gail Badner resolved HHH-6593.
------------------------------

    Resolution: Duplicate
      Assignee: Gail Badner

> Fetch joining subelements of a one-to-one or many-to-one association
> --------------------------------------------------------------------
>
>                 Key: HHH-6593
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-6593
>             Project: Hibernate ORM
>          Issue Type: Bug
>    Affects Versions: 3.6.6
>            Reporter: Christian Beikov
>            Assignee: Gail Badner
>            Priority: Critical
>              Labels: HQL, fetch, hibernate, join
>
> The problem is discussed on the forum a long time ago. I just found the topic and i wanted to report that this bug is still available in 3.6.6
> https://forum.hibernate.org/viewtopic.php?f=1&t=987905&start=0
> Here a concrete example from my usecase:
> class A{
>  private B b;
> }
> class B{
>  private Map<String, C> map;
> }
> class C{
>  private String c;
> }
> Just imagine that the classes and fields would be annotated right ;)
> Now the problem in my case was that i wanted a list of A elements with fetch joined B and of course it's map.
> I tried the following query:
> FROM A a LEFT OUTER JOIN FETCH a.b bElem LEFT OUTER JOIN bElem.map cMap
> and i got a NullPointerException just like the users which posted in the given topic.
> My workaround was:
> FROM A a LEFT OUTER JOIN FETCH a.b bElem LEFT OUTER JOIN a.b.map cMap
> The main problem now is, that i have a dynamic fetch profile system which won't work correctly if this issue is not solved.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list