org.hibernate.QueryException: could not resolve property: person.id

Description

Hello,
got this exception while executing this query:

1 select d from Document d left join d.authorizations a where a.person.id=:personId

where Document.authorizations is an @ElementCollection

The same exception is thrown also when executing an equivalent (JPA) criteria query.

However, all these other queries work just fine:

1 2 3 select d from Document d left join d.authorizations a where a.person=:person select d from Document d left join d.authorizations a join a.person p where p=:person select d from Document d left join d.authorizations a join a.person p where p.id=:personId

I'll provide a test case soon.

Thank you

Environment

Wildfly 10.1.0.Final

Status

Assignee

Unassigned

Reporter

Michele Mariotti

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

5.2.12

Priority

Major
Configure