2016-02-09 23:44:05 -05:00
|
|
|
= 5.1 Migration Guide
|
2015-08-20 15:29:48 -04:00
|
|
|
:toc:
|
|
|
|
|
2016-02-09 23:44:05 -05:00
|
|
|
This guide discusses migration from Hibernate ORM version 5.0 to version 5.1. For migration from
|
2015-08-20 15:29:48 -04:00
|
|
|
earlier versions, see any other pertinent migration guides as well.
|
|
|
|
|
2016-02-09 23:44:05 -05:00
|
|
|
== Oracle12cDialect maps byte[] and Byte[] to BLOB
|
2015-08-20 15:29:48 -04:00
|
|
|
|
2016-02-09 23:44:05 -05:00
|
|
|
Previous versions of Hibernate have mapped `byte[]` and `Byte[]` to Oracle's `LONG RAW` data type (via the JDBC
|
|
|
|
LONGVARBINARY type). Oracle have deprecated the `LONG RAW` data type for many releases - possibly as far back
|
|
|
|
as 8i. Therefore it was decided to start having Hibernate map `byte[]` and `Byte[]` to `BLOB` for Oracle.
|
2015-08-20 15:29:48 -04:00
|
|
|
|
2016-02-09 23:44:05 -05:00
|
|
|
However, in the interest of backwards compatibility and not breaking existing applications it was also decided to
|
|
|
|
limit this change to just the Oracle12cDialect. So starting in 5.1 applications using Oracle12cDialect and
|
|
|
|
implicitly mapping `byte[]` and `Byte[]` values will start seeing those handled as `BLOB` data rather than `LONG RAW`
|
|
|
|
data. For existing applications that want to continue to use Oracle12cDialect and still continue to implicitly map
|
|
|
|
`byte[]` and `Byte[]` attributes to `LONG RAW`, there is a new configuration setting you can use to enable that:
|
|
|
|
`hibernate.dialect.oracle.prefer_longvarbinary`, which is false by default (map to `BLOB`).
|
2015-08-20 15:29:48 -04:00
|
|
|
|
|
|
|
|
2016-02-09 23:44:05 -05:00
|
|
|
== Changes to schema management tooling
|
2015-08-20 15:29:48 -04:00
|
|
|
|
2016-02-09 23:44:05 -05:00
|
|
|
The changes mainly focused on:
|
2015-08-20 15:29:48 -04:00
|
|
|
|
2016-02-09 23:44:05 -05:00
|
|
|
* Unifying handling of `hbm2ddl.auto` and Hibernate's JPA schema-generation support.
|
|
|
|
* Removing JDBC concerns from the SPI to facilitate true replacement (for OGM)
|
2015-08-20 15:29:48 -04:00
|
|
|
|
2016-02-09 23:44:05 -05:00
|
|
|
These changes will only be a migration concern for applications directly using any of the following classes:
|
2015-08-20 15:29:48 -04:00
|
|
|
|
2016-02-09 23:44:05 -05:00
|
|
|
* `org.hibernate.tool.hbm2ddl.SchemaExport`
|
|
|
|
* `org.hibernate.tool.hbm2ddl.SchemaUpdate`
|
|
|
|
* `org.hibernate.tool.hbm2ddl.SchemaValidator`
|
|
|
|
* `org.hibernate.tool.schema.spi.SchemaManagementTool` or any of its delegates
|
2015-08-20 15:29:48 -04:00
|
|
|
|