Unable to use Hibernate/JPA "JOIN FETCH a.b.c" when "b" is an association in EAP
Issue
-
A Hibernate/JPA
JOIN FETCHquery 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 of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
