2024-04-12 14:11:56 -04:00
|
|
|
= 6.6 Migration Guide
|
2015-08-20 15:29:48 -04:00
|
|
|
:toc:
|
2022-01-05 17:24:11 -05:00
|
|
|
:toclevels: 4
|
2022-12-22 11:29:51 -05:00
|
|
|
:docsBase: https://docs.jboss.org/hibernate/orm
|
2024-04-12 14:11:56 -04:00
|
|
|
:versionDocBase: {docsBase}/6.6
|
2022-12-22 11:29:51 -05:00
|
|
|
:userGuideBase: {versionDocBase}/userguide/html_single/Hibernate_User_Guide.html
|
|
|
|
:javadocsBase: {versionDocBase}/javadocs
|
2022-01-05 17:24:11 -05:00
|
|
|
|
2024-04-12 14:11:56 -04:00
|
|
|
This guide discusses migration to Hibernate ORM version 6.6. For migration from
|
2015-08-20 15:29:48 -04:00
|
|
|
earlier versions, see any other pertinent migration guides as well.
|
|
|
|
|
2024-04-12 14:11:56 -04:00
|
|
|
* link:{docsBase}/6.5/migration-guide/migration-guide.html[6.5 Migration guide]
|
2023-12-21 12:01:02 -05:00
|
|
|
* link:{docsBase}/6.4/migration-guide/migration-guide.html[6.4 Migration guide]
|
2023-10-06 10:32:26 -04:00
|
|
|
* link:{docsBase}/6.3/migration-guide/migration-guide.html[6.3 Migration guide]
|
2023-01-27 04:28:55 -05:00
|
|
|
* link:{docsBase}/6.2/migration-guide/migration-guide.html[6.2 Migration guide]
|
2022-12-22 11:29:51 -05:00
|
|
|
* link:{docsBase}/6.1/migration-guide/migration-guide.html[6.1 Migration guide]
|
|
|
|
* link:{docsBase}/6.0/migration-guide/migration-guide.html[6.0 Migration guide]
|
|
|
|
|
2024-05-03 12:18:57 -04:00
|
|
|
[[oracle-implicit-array-types]]
|
|
|
|
== Oracle implicit array types
|
|
|
|
|
|
|
|
The names for implicitly created array types on Oracle have slightly changed to account for converted types.
|
|
|
|
Previously, the naming of implicit array types was only using the Java type simple name which could conflict
|
|
|
|
when the same Java type is used with different JDBC type codes or converters.
|
|
|
|
To avoid name clashes, the naming of implicitly created array types now also includes
|
|
|
|
the preferred Java type simple name of the JDBC type in case the preferred Java type differs from the field type.
|
|
|
|
In case of converted types, the converter Java class simple name is used instead.
|
|
|
|
|
|
|
|
The array type for a persistent property of type `BigInteger[]` was previously `BigIntegerArray`
|
|
|
|
and would now be `BigIntegerBigDecimalArray`, because the preferred Java type for the `NUMERIC`/`DECIMAL` JDBC type is `BigDecimal`.
|
|
|
|
To specify a custom array type name, annotate the persistent property with `@Column(columnDefinition = "BigIntegerArray")`.
|
|
|
|
|
|
|
|
[[user-defined-type]]
|
2024-05-13 02:34:39 -04:00
|
|
|
== Changes to `UserDefinedType`
|
2024-05-03 12:18:57 -04:00
|
|
|
|
|
|
|
`UserDefinedType` was renamed to `UserDefinedObjectType` and everything except access to column information
|
|
|
|
was abstracted in a new interface named `UserDefinedType`. This was done to allow modelling dependencies between
|
|
|
|
named arrays, modeled as `UserDefinedArrayType` extending the new `UserDefinedType` interface,
|
|
|
|
and `UserDefinedObjectType` i.e. arrays of structs.
|
|
|
|
|
|
|
|
`UserDefinedType` was not explicitly annotated with `@Incubating` before,
|
|
|
|
but it was introduced for the incubating `@Struct` feature in ORM 6.2,
|
|
|
|
which made it effectively incubating as well. To make this more clear,
|
|
|
|
the types were now also explicitly marked as `@Incubating`.
|
|
|
|
|
|
|
|
The changes affect users which previously queried or created `UserDefinedType` in a `Namespace`.
|
|
|
|
Methods that return or operate on `UserDefinedType` have been marked as `@Incubating`
|
|
|
|
to make it clear that these contracts might still evolve.
|
|
|
|
|
|
|
|
Another change is to the already incubating `ColumnOrderingStrategy`,
|
|
|
|
where the argument type of `orderUserDefinedTypeColumns` was changed from `UserDefinedType` to `UserDefinedObjectType`.
|
2024-05-13 02:34:39 -04:00
|
|
|
|
|
|
|
[[array-contains-array-deprecation]]
|
|
|
|
== Subset check for arrays to use `array_includes`
|
|
|
|
|
|
|
|
Support for `array_contains()` to accept an array as element argument is deprecated and will emit a warning.
|
|
|
|
To check if an array is a subset of another array, use the `array_includes()` function,
|
|
|
|
or the new `INCLUDES` predicate i.e. `array INCLUDES subarray`.
|
|
|
|
|