Embedded ID mapping

Use an Embedded ID Mapping to specify the primary key of an embedded ID. These mappings may be used with a Embeddable entities.

  1. In the JPA Structure view, select the field to map. The JPA Details view (for attributes) displays the properties for the selected field.

  2. In the Map As field, select Embedded Id.

  3. Use this table to complete the remaining fields on the JPA Details view.

    Property Description Default
    Map As Defines this mapping as a Embedded Id.

    This field corresponds to the @EmbeddedId annotation.

    Embedded Id

Eclipse adds the following annotations to the field:

@EmbeddedId

 

Related task

Mapping an entity

 

Related reference

JPA Structure view
JPA Details view (for attributes)

 

Related concept

Understanding OR mappings
Understanding EJB 3.0 Java Persistence API