Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

AnnotationExplanation
@ColumnDefine columns, column names, and specifications about size and nullability.
@ElementCollection, @CollectionTableUsed to define collections of non JPA objects (like a set of String).
@EntityUsed to define JPA-tracked objects.
@EnumeratedUsed to indicate fields that have enumerated values.
@id @GeneratedValueUsed to managed identifier fields and ID strategy.
@ManyToOne, @OneToOne, @OneToManyUsed to define object relationships between different @Entity annotated classes.
@MappedSuperclassUsed for abstract superclasses to indicate their fields should be included in persistence of concrete subclasses.
@TableUsed to indicate table names for objects. Default underscore-based naming convention is used.
@TemporalUsed @TemporalUsed for date fields. 
@TransientUsed to avoid persistence of fields, these are typically used for DTO fields as we reuse the objects for data transfer.
@UniqueConstraintUsed to index columns that would otherwise not have indexes. Not actually used for uniqueness.

...