@EntityGraph annotation log warning message "Entity graph specified is not applicable to the entity ... . Ignored." and works as if EntityGraph.EntityGraphType.LOAD would set.
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.
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
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.
Will this get into 5.4.x too? Since it’s a regression, I hope it will
PR created at