ObjectDB ObjectDB

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.