Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "EclipseLink/UserGuide/JPA/Basic JPA Development/Entities/Ids/Generating and Configuring Entity Identities"
< EclipseLink | UserGuide | JPA | Basic JPA Development
Line 8: | Line 8: | ||
*[http://www.eclipse.org/eclipselink/api/latest/javax/persistence/Id.html @Id] | *[http://www.eclipse.org/eclipselink/api/latest/javax/persistence/Id.html @Id] | ||
* [http://www.eclipse.org/eclipselink/api/latest/javax/persistence/IdClass.html @IdClass] | * [http://www.eclipse.org/eclipselink/api/latest/javax/persistence/IdClass.html @IdClass] | ||
− | * [http://www.eclipse.org/eclipselink/api/latest/javax/persistence/ | + | * [http://www.eclipse.org/eclipselink/api/latest/javax/persistence/Embedded.html @Embedded] |
* [http://www.eclipse.org/eclipselink/api/latest/javax/persistence/GeneratedValue.html @GeneratedValue] | * [http://www.eclipse.org/eclipselink/api/latest/javax/persistence/GeneratedValue.html @GeneratedValue] | ||
* [http://www.eclipse.org/eclipselink/api/latest/javax/persistence/TableGenerator.html @TableGenerator] | * [http://www.eclipse.org/eclipselink/api/latest/javax/persistence/TableGenerator.html @TableGenerator] | ||
* [http://www.eclipse.org/eclipselink/api/latest/javax/persistence/SequenceGenerator.html @SequenceGenerator ] | * [http://www.eclipse.org/eclipselink/api/latest/javax/persistence/SequenceGenerator.html @SequenceGenerator ] | ||
+ | * [http://www.eclipse.org/eclipselink/api/latest/javax/persistence/package-summary.html Package javax.persistence] | ||
}} | }} |
Revision as of 12:54, 8 April 2011
EclipseLink JPA
EclipseLink | |
Website | |
Download | |
Community | |
Mailing List • Forums • IRC • mattermost | |
Issues | |
Open • Help Wanted • Bug Day | |
Contribute | |
Browse Source |
Generating and Configuring Entity Identities
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:
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... |