JPA Annotations for Fields
The way a field of a persistable class is managed by JPA can be set by the following annotations:
- javax.persistence.Basic - JPA Annotation
- javax.persistence.Embedded - JPA Annotation
- javax.persistence.ElementCollection - JPA Annotation
- javax.persistence.Id - JPA Annotation
- javax.persistence.EmbeddedId - JPA Annotation
- javax.persistence.Version - JPA Annotation
- javax.persistence.Transient - JPA Annotation
Additional annotations (and enum) are designated for enum fields:
- javax.persistence.Enumerated - JPA Annotation
- javax.persistence.MapKeyEnumerated - JPA Annotation
- javax.persistence.EnumType - JPA Enum
Other additional annotations (and enum) are designated for date and calendar fields:
- javax.persistence.Temporal - JPA Annotation
- javax.persistence.TemporalType - JPA Enum
- javax.persistence.MapKeyTemporal - JPA Annotation
Chapter 2 of the ObjectDB manual explains how to use all the above annotations.