[hibernate-issues] [JIRA] (HHH-14124) Entity graph (fetch graph) is incorrectly applied to query results beyond the first one

Yoann Rodière (JIRA) jira at hibernate.atlassian.net
Wed Jul 29 05:46:35 EDT 2020


Yoann Rodière ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A58fa1ced-171a-4c00-97e8-5d70d442cc4b ) *updated* an issue

Hibernate ORM ( https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiNzkxZjg4NzczZGU5NDMzZjkyYzE5ZDFkMTNlZmIxODkiLCJwIjoiaiJ9 ) / Bug ( https://hibernate.atlassian.net/browse/HHH-14124?atlOrigin=eyJpIjoiNzkxZjg4NzczZGU5NDMzZjkyYzE5ZDFkMTNlZmIxODkiLCJwIjoiaiJ9 ) HHH-14124 ( https://hibernate.atlassian.net/browse/HHH-14124?atlOrigin=eyJpIjoiNzkxZjg4NzczZGU5NDMzZjkyYzE5ZDFkMTNlZmIxODkiLCJwIjoiaiJ9 ) Entity graph (fetch graph) is incorrectly applied to query results beyond the first one ( https://hibernate.atlassian.net/browse/HHH-14124?atlOrigin=eyJpIjoiNzkxZjg4NzczZGU5NDMzZjkyYzE5ZDFkMTNlZmIxODkiLCJwIjoiaiJ9 )

Change By: Yoann Rodière ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A58fa1ced-171a-4c00-97e8-5d70d442cc4b )

When I apply a fetch graph to a query, it is correctly applied to the first result: eager associations that are not mentioned in the fetch graph are overridden and made lazy.

However, this is not true for query results beyond the first one (index 1, 2, etc.): for those results, eager associations are loaded eagerly, even if they are not mentioned in the fetch graph.

This used to work in 5.4.18.Final.

PR coming, with a test case and hopefully a fix.

( https://hibernate.atlassian.net/browse/HHH-14124#add-comment?atlOrigin=eyJpIjoiNzkxZjg4NzczZGU5NDMzZjkyYzE5ZDFkMTNlZmIxODkiLCJwIjoiaiJ9 ) Add Comment ( https://hibernate.atlassian.net/browse/HHH-14124#add-comment?atlOrigin=eyJpIjoiNzkxZjg4NzczZGU5NDMzZjkyYzE5ZDFkMTNlZmIxODkiLCJwIjoiaiJ9 )

Get Jira notifications on your phone! Download the Jira Cloud app for Android ( https://play.google.com/store/apps/details?id=com.atlassian.android.jira.core&referrer=utm_source%3DNotificationLink%26utm_medium%3DEmail ) or iOS ( https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=EmailNotificationLink&mt=8 ) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100140- sha1:42b370d )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/hibernate-issues/attachments/20200729/1a40438e/attachment.html 


More information about the hibernate-issues mailing list