Adding a primary key to the JPA entity

Every entity that is mapped to a relational database must have a mapping to a primary key in the table.

About this task

The EJB 3.0 specification supports three different ways to specify the entity identity:
  • @Id annotation
  • @IDClass annotation
  • @EmbeddedId annotation
Icon that indicates the type of topic Task topic
Timestamp icon Last updated: July 17, 2017 21:58

File name: t_add_primekey.html