Unable to use Hibernate/JPA "JOIN FETCH a.b.c" when "b" is an association in EAP
Issue
-
A Hibernate/JPA
JOIN FETCH
query is defined with a join association path expression including multiple associationsSELECT a FROM EntityA a JOIN FETCH a.b b JOIN FETCH a.b.c c ...
-
This query syntax was permitted in early EAP 6.x releases but fails in current EAP 6.4.0 cumulative patch levels with
... java.lang.IllegalArgumentException: org.hibernate.QueryException: query specified join fetching, but the owner of the fetched association was not present in the select list ...
Environment
- Red Hat JBoss Enterprise Application Platform (EAP) 6, 7
- Hibernate 4, 5
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.