jakarta.persistence.Basic annotation,
or in conjunction with the jakarta.persistence.ElementCollection annotation when the
element collection value is of basic type. If the TimeZoneStorage annotation is not used,
the TimeZoneStorageType has 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;
...
}
TimeZoneStorageType, TimeZoneColumn
| Modifier and Type | Method and Description |
|---|---|
| public TimeZoneStorageType |
| value | back to summary |
|---|---|
| public TimeZoneStorageType value() The storage strategy for the time zone information. | |