I upgraded my Spring Boot Java application from 2.7.5 to 3.0.2 All works fine except of EntityGraph when the I need to retrieve a very deep property:
this chain worked pretty good with the lower version of hibernate but with the latest one just report.reportStages.taskLibrary.tasks are populated; for team - teamId is provided but team is null.
Please advise how this issue can be solved with the latest version of hibernate ORM.
Thank you in advance.
We will only know for sure if you test it. Also, try Hibernate ORM 6.2.0.CR4. Chances are, we already fixed your issue.
it’s definitely the same issue.
I already tested it myself. 3 levels of depth working as a charm - no problems at all but if we have more deeper relationships - that’s it - the value will stay null.
If it’s the same issue, you can watch that and will get notified as soon as we have the time to fix it.
I’m adding 1 more issue to this: we were able to get the Pageable sorting data by field like team.members.user.firstName and total elements showed the expected number of elements on the prior version of hibernate. Now I’m getting the filtered result: only records for which this association is filled are provided in the content of Pageable, records with null values are filtered out !
If you are facing a new issue, please create an issue in the issue tracker(https://hibernate.atlassian.net) with a test case(hibernate-test-case-templates/JPAUnitTestCase.java at main · hibernate/hibernate-test-case-templates · GitHub) that reproduces the issue.
Note though, that a path expression over associations will always result in inner joins according to the JPA specification. If you want left join semantics, you have to code joins explicitly. No idea what Spring Data does.