Querying entity with non-ID property named 'id' fails if entity has an IdClass composite key

Description

For example:

1 2 3 4 5 6 7 8 9 10 11 @Entity(name = "Person") @IdClass(PersonId.class) public static class Person implements Serializable { @Id private String name; @Id @Column( name = "ind") private int index; private Integer id; }

Executing the following query results in a QueryException:
s.createQuery( "from Person p where p.id is null", Person.class ).list()

Environment

None

Status

Assignee

Gail Badner

Reporter

Gail Badner

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

5.3.7
5.1.16

Priority

Major