[hibernate-issues] [Hibernate-JIRA] Issue Comment Edited: (HHH-5465) HQL left join fetch of an element collection following a left join fetch of a one-to-one relationship causes NullPointerException

Christian Beikov (JIRA) noreply at atlassian.com
Tue May 15 13:18:09 EDT 2012


    [ https://hibernate.onjira.com/browse/HHH-5465?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=46533#comment-46533 ] 

Christian Beikov edited comment on HHH-5465 at 5/15/12 12:16 PM:
-----------------------------------------------------------------

Will this bug be fixed soon or just ignored?
There is a patch avilable, why not run the test and include the fix in the next release??

      was (Author: christian.beikov):
    Will this bug be fixed soon or just ignored?
There is a path avilable, why not run the test and include the fix in the next release??
  
> HQL left join fetch of an element collection following a left join fetch of a one-to-one relationship causes NullPointerException
> ---------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HHH-5465
>                 URL: https://hibernate.onjira.com/browse/HHH-5465
>             Project: Hibernate ORM
>          Issue Type: Bug
>          Components: query-hql
>    Affects Versions: 3.5.4
>         Environment: Hibernate 3.5.4, Postgresql 8.4, Java 6
>            Reporter: Andrew Tolopko
>            Assignee: Sharath Reddy
>         Attachments: hibernate-left-fetch-join-element-collection.patched.zip, hibernate-left-fetch-join-element-collection.zip, log.patched.txt, log.txt
>
>
> HQL queries of the form 
> "from EntityA a left join fetch a.entityB b left join fetch b.items"
> fail with a NullPointerExeption when EntityA and EntityB have a one-to-one (@OneToOne) relationship and EntityB.items is an element collection (@ElementCollection, aka collection of values).  
> For comparison, the following HQL queries are all admissible (which intends to demonstrate that no particular clause of the the above HQL is incorrect):
> "from EntityB b left join fetch b.items"
> "from EntityA a left join fetch a.entityB"
> "from EntityA a left join fetch a.entityB.items"
> "from EntityA a left join fetch a.entityCs c left join fetch c.items" (where EntityA and EntityC have a one-to-many (@OneToMany) relationship, and EntityC.items is an element collection)
> Test code is attached.  The log output along with thrown exception is attached as log.txt.

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