Package org.hibernate.annotations
Annotation Interface Source
@Deprecated(since="6.2",
forRemoval=true)
@Target({METHOD,FIELD})
@Retention(RUNTIME)
public @interface Source
Deprecated, for removal: This API element is subject to removal in a future version.
Indicates the source of timestamps for an entity
version property of
type
Timestamp
:
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:
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionDeprecated, for removal: This API element is subject to removal in a future version.The source of timestamps.
-
Element Details
-
value
SourceType valueDeprecated, for removal: This API element is subject to removal in a future version.The source of timestamps. By default, the virtual machine is the source.- Default:
- VM
-
CurrentTimestamp
instead