Unit test to demonstrate problem in Hibernate when using a query with fetch graph on entity containing embedded component.
Running this test using Maven with default profile
mvn verify
will result in queryUsingFetchGraph
failing. However running this test using EclipseLink
mvn -Peclipselink verify
will pass both tests.
The problem seems to originate in EntityGraphQueryHint which handles entity types and collection types, but not component types. Compare this to LoadQueryJoinAndFetchProcessor which handles all 3.