2022-09-05 06:35:32 +02:00
= 6.2 Migration Guide
2015-08-20 14:29:48 -05:00
:toc:
2022-01-05 16:24:11 -06:00
:toclevels: 4
2022-09-05 06:35:32 +02:00
:docsBase: https://docs.jboss.org/hibernate/orm/6.2
2022-01-05 16:24:11 -06:00
:userGuideBase: {docsBase}/userguide/html_single/Hibernate_User_Guide.html
:javadocsBase: {docsBase}/javadocs
2022-09-05 06:35:32 +02:00
This guide discusses migration from Hibernate ORM version 6.2. For migration from
2015-08-20 14:29:48 -05:00
earlier versions, see any other pertinent migration guides as well.
2022-10-04 09:40:16 +02:00
* link:https://github.com/hibernate/hibernate-orm/blob/6.1/migration-guide.adoc[6.1 Migration guide]
* link:https://github.com/hibernate/hibernate-orm/blob/6.0/migration-guide.adoc[6.0 Migration guide]
2022-09-13 20:01:24 +02:00
== Default DDL type changes
=== UUID mapping changes on MariaDB
On MariaDB, the type code `SqlType.UUID` now by default refers to the DDL type `uuid`, whereas before it was using `binary(16)`.
Due to this change, schema validation errors could occur on existing databases.
The migration to `uuid` requires a migration expression like `cast(old as uuid)`.
To retain backwards compatibility, configure the setting `hibernate.type.preferred_uuid_jdbc_type` to `BINARY`.
2022-09-13 20:15:28 +02:00
=== UUID mapping changes on SQL Server
On SQL Server, the type code `SqlType.UUID` now by default refers to the DDL type `uniqueidentifier`, whereas before it was using `binary(16)`.
Due to this change, schema validation errors could occur on existing databases.
The migration to `uuid` requires a migration expression like `cast(old as uuid)`.
To retain backwards compatibility, configure the setting `hibernate.type.preferred_uuid_jdbc_type` to `BINARY`.
2022-09-26 14:11:12 +02:00
=== Column type inference for `number(n,0)` in native SQL queries on Oracle
Previously, since Hibernate 6.0, columns of type `number` with scale 0 on Oracle were interpreted as `boolean`, `tinyint`, `smallint`, `int`, or `bigint`,
depending on the precision.
Now, columns of type `number` with scale 0 are interpreted as `int` or `bigint` depending on the precision.