Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
EclipseLink/UserGuide/JPA/Basic JPA Development/Entities/Ids/Generating and Configuring Entity Identities
< EclipseLink | UserGuide | JPA | Basic JPA Development
Revision as of 12:10, 15 June 2010 by Unnamed Poltroon (Talk) (New page: =Entity= Every entity must have a persistent identity, which is an equivalent of a primary key in a database table that stores the entity state. By default, the [[EclipseLink/UserGuide/JP...)
Entity
Every entity must have a persistent identity, which is an equivalent of a primary key in a database table that stores the entity state.
By default, the EclipseLink persistence provider assumes that each entity has at least one field or property that serves as a primary key.
You can generate and/or configure the identity of your entities by using the following annotations:
- @Id
- @IdClass
- @EmbeddedId
- @GeneratedValue
- @TableGenerator
- @SequenceGenerator
You can also use these annotations to fine-tune how your database maintains the identity of your entities.
Mapping | @Id | |
EclipseLink Home
JPA User Guide: Table of Contents, Search |
||
How to contribute to this guide... |