Entity

An Entity is a persistent domain object.

An entity can be:

An entity must have:

Each persistent entity must be mapped to a database table and contain a primary key. Persistent entities are identified by the @Entity annotation.

Use this procedure to add persistence to an existing entity:

  1. Open the Java class in the Package Explorer.

  2. Select the class in the JPA Structure view.

  3. In the JPA Details view, use the Map As field to select Entity.

    Selecting Entity Persistence

    Selecting entity persistence on the JPA Details view.
  4. Complete the remaining JPA Details view (for entities).

 

Related tasks

Adding persistence to a class
Specifying additional tables
Specifying entity inheritance