Emond Papegaaij (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *created* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiNmMxNzdhMDlh...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-16106?atlOrigin=eyJpIjoiNmMxNz...
) HHH-16106 (
https://hibernate.atlassian.net/browse/HHH-16106?atlOrigin=eyJpIjoiNmMxNz...
) Using BatchEntitySelectFetchInitializer causes PostLoad to be called before references
are initialized (
https://hibernate.atlassian.net/browse/HHH-16106?atlOrigin=eyJpIjoiNmMxNz...
)
Issue Type: Bug Affects Versions: 6.2.0.CR1, 6.1.6 Assignee: Unassigned Components:
hibernate-core Created: 26/Jan/2023 01:49 AM Priority: Major Reporter: Emond Papegaaij (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
)
This issue is very similar to
https://hibernate.atlassian.net/browse/HHH-16025 (
https://hibernate.atlassian.net/browse/HHH-16025 ). The fix for that issue explicitly
initializes the references to other entities when caching is enabled to prevent the null
values from being cached. However, it does not address the other issue also mentioned in
the comments of that issue: the PostLoad callback is also called before the entity is
fully initialized. I’ve attached a testcase, which is a slightly modified version of the
one attached to 16025, demonstrating this issue. In this testcase, caching is disabled and
an assert is placed inside the PostLoad callback method.
(
https://hibernate.atlassian.net/browse/HHH-16106#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16106#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#100214- sha1:634fa42 )