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://github.com/philiplowney/hibernate-max-fetch-depth-bug|smart-link] .
We have tested that this functionality was working with 5.3.9-Final and 5.6.15-Final. |
|