Embedded Mapping


Use an Embedded Mapping to specify a persistent field or property of an entity whose value is an instance of an embeddable class.

  1. In the Persistence Outline View, select the field to map. The Persistence Properties View (for Attributes) displays the properties for the selected field.

  2. In the Map As field, select Embedded.

  3. Use this table to complete the remaining fields on the Persistence Properties view.

    Property Description Default
    Map As Defines this mapping as a Embedded. Embedded
    Attribute Overrides Specify to override the default mapping of an entity's attribute.
    Columns The database column that is being mapped to the entity's attribute.

Eclipse adds the following annotations to the field:

@Embedded

 

Related task

Mapping an Entity

 

Related reference

Persistence Outline View
Persistence Properties View (for Attributes)

 

Related concept

Understanding OR Mapping
Understanding JSR220: EJB 3.0