HHH-16035 document Duration -> NUMERIC mapping
This commit is contained in:
parent
6f7b17d36b
commit
6ca9643c72
|
@ -85,7 +85,7 @@ in <<basic-custom-type>>.
|
|||
[cols="<.^,<.^,<.^,<.^",options="header",]
|
||||
|=================================================================================================
|
||||
|Hibernate type (org.hibernate.type package) |JDBC type |Java type |BasicTypeRegistry key(s)
|
||||
|DURATION |INTERVAL_SECOND |java.time.Duration |Duration, java.time.Duration
|
||||
|DURATION |NUMERIC |java.time.Duration |Duration, java.time.Duration
|
||||
|INSTANT |TIMESTAMP_UTC |java.time.Instant |Instant, java.time.Instant
|
||||
|LOCAL_DATE_TIME |TIMESTAMP |java.time.LocalDateTime |LocalDateTime, java.time.LocalDateTime
|
||||
|LOCAL_DATE |DATE |java.time.LocalDate |LocalDate, java.time.LocalDate
|
||||
|
|
|
@ -980,7 +980,9 @@ include::{sourcedir}/basic/BlobByteArrayTest.java[tags=basic-blob-byte-array-exa
|
|||
|
||||
==== Duration
|
||||
|
||||
By default, Hibernate will map `Duration` to the `INTERVAL_SECOND` SQL type and fallback to `NUMERIC` if necessary.
|
||||
By default, Hibernate maps `Duration` to the `NUMERIC` SQL type.
|
||||
|
||||
TIP: It's possible to map `Duration` to the `INTERVAL_SECOND` SQL type using `@JdbcType(INTERVAL_SECOND)` or by setting `hibernate.type.preferred_duration_jdbc_type=INTERVAL_SECOND`
|
||||
|
||||
[[basic-duration-example]]
|
||||
.Mapping Duration
|
||||
|
|
Loading…
Reference in New Issue