Package org.hibernate.annotations
Annotation Type TimeZoneStorage
-
@Incubating @Retention(RUNTIME) @Target({FIELD,METHOD}) public @interface TimeZoneStorage
Specifies how the time zone information of a persistent property or field should be persisted. This annotation may be used in conjunction with theBasicannotation, or in conjunction with theElementCollectionannotation when the element collection value is of basic type. If theTimeZoneStorageannotation is not used, theTimeZoneStorageTypehas a default value determined by the dialect and by the configuration property "hibernate.timezone.default_storage".For example:
@Entity public class Person { @Column(name = "birth_timestamp") @TimeZoneColumn(name = "birth_zone") @TimeZoneStorage(COLUMN) public OffsetDateTime birthDate; @TimeZoneStorage(NATIVE) public OffsetDateTime registrationDate; ... }- Since:
- 6.0
- See Also:
TimeZoneStorageType,TimeZoneColumn
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description TimeZoneStorageTypevalueThe storage strategy for the time zone information.
-
-
-
Element Detail
-
value
TimeZoneStorageType value
The storage strategy for the time zone information.- Default:
- org.hibernate.annotations.TimeZoneStorageType.AUTO
-
-