73 words

JPA Annotations for Value Generation

Automatically generated values are mainly useful for primary key fields, but are supported by ObjectDB also for regular (non primary key) persistent fields.

At the field level, the @GeneratedValue with an optional GenerationType strategy is specified:

The @GeneratedValue annotation can also reference a value generator, which is defined at the class level by using one of the following annotations:

More details about automatic value generation are provided at the Generated Value section of the ObjectDB Manual.

This documentation page is derived (with some adjustments) from the open source JPA 2 RI (EclipseLink)
and is available under the terms of the Eclipse Public License, v. 1.0 and Eclipse Distribution License, v. 1.0.
Object Relational Mapping (ORM) JPA 2 providers include Hibernate, EclipseLink, TopLink, OpenJPA and DataNucleus.
Object DB is not an ORM JPA implementation but an Object Database for Java with built in JPA 2 support.