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:
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).