Package org.hibernate.annotations
Annotation Interface UpdateTimestamp
Specifies that the annotated field of property is a generatedupdate timestamp. The timestamp is regenerated every time an entity instance is updated in the database.
By default, the timestamp is generatedin memory, but this may be changed by explicitly specifying thesource(). Otherwise, this annotation is a synonym for@CurrentTimestamp(source=VM).
The annotated property may be of any one of the following types:Date,Calendar,Date,Time,Timestamp,Instant,LocalDate,LocalDateTime,LocalTime,MonthDay,OffsetDateTime,OffsetTime,Year,YearMonth, orZonedDateTime.
A field annotated@UpdateTimestamp may not be directly set by the application program.
- See Also:
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionSpecifies how the timestamp is generated.
Element Details
source
SourceType sourceSpecifies how the timestamp is generated. By default, it is generated in memory, which might save a round trip to the database, depending on the capabilities of the database and JDBC driver.- Default:
- VM