For the IdClass annotation the spec states that the "The Id annotation must
also be applied to the corresponding fields or properties of the entity.".
So in my opinion the XML ORM should follow the same rule.
On 8 May 2018 at 23:13, Gail Badner <gbadner(a)redhat.com> wrote:
When an entity with an IdClass is mapped using XML ORM descriptors,
Hibernate requires the Id properties to be mapped as well, as in the
If the <id> elements are not included, an exception is thrown:
"No identifier specified for entity: ..."
Should Hibernate require the <id> elements to be explicitly mapped, or
should it be able to determine this information by reflection from the
class configured by <id-class>?
hibernate-dev mailing list