Package org.hibernate.annotations
Annotation Type Source
-
@Deprecated(since="6.2") @Remove @Target({METHOD,FIELD}) @Retention(RUNTIME) public @interface Source
Deprecated.useCurrentTimestamp
insteadIndicates the source of timestamps for an entity version property of typeTimestamp
:SourceType.VM
indicates that the virtual machine current instance is used, andSourceType.DB
indicates that the databasecurrent_timestamp
function should be used.
For example, the following timestamp is generated by the database:
@Version @Source(DB) private LocalDateTime version;
This annotation is always used in conjunction with the JPA
@Version
annotation.- See Also:
Version
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description SourceType
value
Deprecated.The source of timestamps.
-
-
-
Element Detail
-
value
SourceType value
Deprecated.The source of timestamps. By default, the virtual machine is the source.- Default:
- org.hibernate.annotations.SourceType.VM
-
-