@EntityGraph annotation log warning message "Entity graph specified is not applicable to the entity ... . Ignored." and works as if EntityGraph.EntityGraphType.LOAD would set.
Description
After update to hibernate 4.5.20 with a new spring-boot 2.3.3 my application start to flood logs with a warning
"Entity graph specified is not applicable to the entity [entity type]. Ignored."
and a lot of N+1 query issues appeared while report generation.
@EntityGraph annotation starts to log this error on each entity retrieving. and start to work as if EntityGraph.EntityGraphType.LOAD would set. so it fetches a lot eagerly fetched relationships (in my case it is crucial as I have quite a complex data model and retrieve few thousands of entities ).
Here is a git repo that has only 4 entities and reproduces the issue.
https://github.com/ikarfall/hibernate-entity-graph-bug
Run the test to see warning in logs end extra queries.
here is the diff of console output between 4.5.18 and 4.5.20
Environment
Activity
It was backported, releasing soon! Many thanks and
I am hoping as well. I left a comment in the PR to urge back porting (among many other guys). Fingers crossed.
Nathan?
Will this get into 5.4.x too? Since itโs a regression, I hope it will
PR created at