This issue is very similar to 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. |