2.5.2.5. Embedded Id
If your entity has multiple identity values, you may declare multiple
@Id fields, or you may declare a single @EmbeddedId field.
The type of a field annotated with EmbeddedId must be an embeddable entity class.
The fields of this embeddable class are considered the identity values of the owning entity.
We explore entity identity and identity fields in Identity Fields.
The EmbeddedId annotation has no properties.
The equivalent XML element is embedded-id.
It has one required attribute:
-
name: The name of the identity field or property.