We're updating the issue view to help you get more done. 

"query specified join fetching, but the owner of the fetched association was not present in the select list" with @ElementCollection

Description

the following QueryException occours if we execute the JPQL: SELECT b FROM A a INNER JOIN a.bs b INNER JOIN FETCH b.someOtherLongs. Without the INNER JOIN FETCH b.someOtherLongs it works fine. The attribute someOtherLongs is a @ElementCollection

TestCases are attached

Environment

hibernate-entitymanager 4.2.2

Status

Assignee

Unassigned

Reporter

F Kern

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

5.0.0.Final
5.2.0
5.1.0
4.2.0.Final

Priority

Major