This annotation specifies the compound primary key class mapped to multiple fields or properties of the entity class.
This annotation is applicable to the mapped superclass or entity class.
The name and type of the field or property of the compound primary key class must match with that of the field or property of the primary key of entity class. The name and type specified in this annotation must correspond to the name and type of the property or field of primary key of the entity in which @Id is added.
The applicable target is class.
The following table lists the elements of @IdClass:
Element name | Optional/Required | Element description |
---|---|---|
value | Required | This element specifies the compound primary key class. |
The details of attributes that are supported with Cosminexus JPA provider are as follows: