Package org.hibernate.annotations
Annotation Type CreationTimestamp
-
@Retention(RUNTIME) @Target({FIELD,METHOD}) public @interface CreationTimestamp
Specifies that the annotated field of property is a generated creation timestamp. The timestamp is generated just once, when an entity instance is inserted in the database.By default, the timestamp is generated by in memory, but this may be changed by explicitly specifying the
source()
. Otherwise, this annotation is a synonym for@CurrentTimestamp(timing=INSERT,source=VM)
.- See Also:
CurrentTimestamp
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description SourceType
source
Specifies how the timestamp is generated.
-
-
-
Element Detail
-
source
SourceType source
Specifies how the timestamp is generated. By default, it is generated in memory, which saves a round trip to the database.- Default:
- org.hibernate.annotations.SourceType.VM
-
-