Property paths for associations that are part of the entity ID (i.e. IdClass) are not initialized

Description

I have found an issue when trying to query an embedded identifier property from an association that is mapped as an identifier of an entity that uses IdClass.

Given the following domain:

The test:

will fail with:

Because idClassEntity.basicEntity.key1 is not added as property path in the BasicEntityPropertyMapping. This is because idClassEntity.basicEntity is treated as a basic type rather than an association type. This is most likely caused by the handling of attributes that are derived from @IdClass attributes in the metamodel, as reported in HHH-12969, although it might be possible to work around the issue without solving (which would probably require some bigger rework of the IdClass related code).

Environment

None

Assignee

Jan-Willem Gmelig Meyling

Reporter

Jan-Willem Gmelig Meyling

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Affects versions

Priority

Minor
Configure