Top Description Methods
org.hibernate.annotations

public @Interface Source

extends Annotation
Annotations
@Deprecated
since:6.2
@Remove
@Target:METHOD, FIELD
@Retention:RUNTIME
@ValueGenerationType
generatedBy:SourceGeneration
Imports
org.hibernate.Remove, org.hibernate.generator.internal.SourceGeneration, java.lang.annotation.Retention, .Target

Deprecated

since 6.2.

use CurrentTimestamp instead

Indicates the source of timestamps for an entity version property of type java.sql.Timestamp:

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.

Author
Hardy Ferentschik
See Also
jakarta.persistence.Version

Method Summary

Modifier and TypeMethod and Description
public SourceType
value()

The source of timestamps.

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

valueback to summary
public SourceType value()

The source of timestamps. By default, the virtual machine is the source.