Philip Lowney (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=5c18c2f...
) *updated* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiY2RhNjdkODE1...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-16871?atlOrigin=eyJpIjoiY2RhNj...
) HHH-16871 (
https://hibernate.atlassian.net/browse/HHH-16871?atlOrigin=eyJpIjoiY2RhNj...
) Queries returning null values for related entities depending on
'max_fetch_depth' (
https://hibernate.atlassian.net/browse/HHH-16871?atlOrigin=eyJpIjoiY2RhNj...
)
Change By: Philip Lowney (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=5c18c2f...
)
We have recently upgraded to Hibernate 6.2.5.Final. After updating, we noted an issue
related to the {{max_fetch_depth}} parameter - depending on the value of
{{max_fetch_depth}}, entity relationships defined on fetched entities as @ManyToOne and
@OneToMany were being set to * null * rather than initialised with a proxy. This appears
to be a bug to us because there is no way to now distinguish between absent data and data
that should be lazily loaded.
A sample project together with failing tests has been created on GitHub:
[
https://github.com/philiplowney/hibernate-max-fetch-depth-bug|https://git...]
(
https://hibernate.atlassian.net/browse/HHH-16871#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16871#add-comment?atlOrigin=ey...
)
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....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100227- sha1:d7f1864 )