GeneratorType.AUTO
: The default.
Assign the field a generated value, leaving the details to the JPA
vendor.
GenerationType.IDENTITY
: The
database will assign an identity value on insert.
GenerationType.SEQUENCE
: Use a
datastore sequence to generate a field value.
GenerationType.TABLE
: Use a sequence
table to generate a field value
uuid-string
: OpenJPA will generate a
128-bit type 1 UUID unique within the network, represented as a
16-character string. For more information on UUIDs, see the IETF UUID
draft specification at:
http://www1.ics.uci.edu/~ejw/authoring/uuid-guid/
uuid-hex
: Same as uuid-string
, but represents the type 1 UUID as a
32-character hexadecimal string.
uuid-type4-string
: OpenJPA will
generate a 128-bit type 4 pseudo-random UUID, represented as a
16-character string. For more information on UUIDs, see the IETF UUID
draft specification at:
http://www1.ics.uci.edu/~ejw/authoring/uuid-guid/
uuid-type4-hex
: Same as uuid-type4-string
, but represents the type 4
UUID as a 32-character hexadecimal string.
CascadeType.PERSIST
: When persisting
an entity, also persist the entities held in this field. We suggest
liberal application of this cascade rule, because if the EntityManager
finds a field that references a
new entity during flush, and the field does not use CascadeType.PERSIST
, it is an error.
CascadeType.REMOVE
: When deleting an
entity, also delete the entities held in this field.
CascadeType.REFRESH
: When refreshing
an entity, also refresh the entities held in this field.
CascadeType.MERGE
: When merging
entity state, also merge the entities held in this field.