Skip to content

Commit 417eb89

Browse files
committed
HHH-17557 update migration guide
1 parent 2e6902d commit 417eb89

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

migration-guide.adoc

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,13 +261,22 @@ Hibernate previously added support for generating check constraints for enums ma
261261
as part of schema generation. 7.0 adds the same capability for enums mapped using an `AttributeConverter`,
262262
by asking the converter to convert all the enum constants on start up.
263263

264+
[[datetime-native]]
265+
== Date and time types returned by native queries
266+
267+
In the absence of a `@SqlResultSetMapping`, previous versions of Hibernate used `java.sql` types (`Date`, `Time`, `Timestamp`) to represent date/time types returned by a native query.
268+
In 7.0, such queries return types defined by `java.time` (`LocalDate`, `LocalTime`, `LocalDateTime`) by default.
269+
The previous behavior may be recovered by setting `hibernate.query.native.prefer_jdbc_datetime_types` to `true`.
270+
264271

265272
[[ddl-implicit-datatype-timestamp]]
266-
== Default precision for timestamp on some databases
273+
== Default precision for `timestamp` on some databases
267274

268275
The default precision for Oracle timestamps was changed to 9 i.e. nanosecond precision.
269276
The default precision for SQL Server timestamps was changed to 7 i.e. 100 nanosecond precision.
270277

278+
Note that these changes only affect DDL generation.
279+
271280

272281
[[sf-name]]
273282
== SessionFactory Name (and JNDI)

0 commit comments

Comments
 (0)