2.4.1.3. Identity Fields
All entity classes must declare one or more fields which together form the persistent identity of an instance.
These are called identity or primary key fields.
In our Magazine class, isbn and title are identity fields, because no two magazine records in the datastore can have the same isbn and title values. Id will show you how to denote your identity fields in JPA metadata. Entity Identity below examines persistent identity.
|
|
OpenJPA fully supports identity fields, but does not require them. See Object Identity of the Reference Guide for details. |