I have a complex object graph (closed source code) that leads to a NullPointerException when using a specific EntityGraph. I tried to reproduce with a simple opensource case but I could not.
I think the solution is to add null guard to attributeNode at https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/main/java/org/hibernate/loader/plan/build/internal/AbstractEntityGraphVisitationStrategy.java#L183 like this:
This solution fixes my issue.
I am creating a PR for this. Alas there will be no test :/
Here is the stacktrace:
The issue is marked as fixed on 5.4.17 but does not seem so. The PR was targeting master. Should I create a PR for branch 5.4?
the PR has been merged and it will be available in 5.4.23
Thank you !