Annotation Interface TemporalId


@Target({METHOD,FIELD}) @Retention(RUNTIME) public @interface TemporalId
Specifies the "primary key" attribute of an entity that is always non-null and there can be no other entity with the same key at any point in time. Requirements:
  • The same attribute should also be annotated with Id.
  • The same attribute should also be annotated with GeneratedValue. It is suggested GenerationType.IDENTITY to be used for simplicity and that works with a column that has type "INT AUTO_INCREMENT PRIMARY KEY".
It is possible to annotate the attribute with Column in order to use a different database column name. Other Column attributes should not be used.
See Also:
UniqueKey