From 9de9afed86e35bcd8c64e769334b5dc398b0d7d2 Mon Sep 17 00:00:00 2001 From: Christian Beikov Date: Thu, 21 Nov 2024 13:23:14 +0100 Subject: [PATCH] HHH-16160 Fix some XML related issues that came up --- migration-guide.adoc | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/migration-guide.adoc b/migration-guide.adoc index 91fd7476ea..f1333ec226 100644 --- a/migration-guide.adoc +++ b/migration-guide.adoc @@ -315,10 +315,10 @@ The default precision for SQL Server timestamps was changed to 7 i.e. 100 nanose Note that these changes only affect DDL generation. -[[array-mapping-changes-on-db2-sap-hana-and-sybase-ase]] -== Array mapping changes on DB2, SAP HANA and Sybase ASE +[[array-mapping-changes-on-db2-sap-hana-sql-server-and-sybase-ase]] +== Array mapping changes on DB2, SAP HANA, SQL Server and Sybase ASE -On DB2, SAP HANA and Sybase ASE, basic arrays now map to the `SqlTypes.XML_ARRAY` type code, +On DB2, SAP HANA, SQL Server and Sybase ASE, basic arrays now map to the `SqlTypes.XML_ARRAY` type code, whereas previously, the dialect mapped arrays to `SqlTypes.VARBINARY`. The `SqlTypes.XML_ARRAY` type uses the `xml` DDL type which enables using arrays in other features through the various XML functions. @@ -338,6 +338,19 @@ The migration requires to read data and re-save it. To retain backwards compatibility, configure the setting `hibernate.type.preferred_array_jdbc_type` to `VARBINARY`. +[[xml-format-mapper-changes]] +== XML FormatMapper changes + +Previous versions of Hibernate ORM used an undefined/provider-specific format for serialization/deserialization of +collections, maps and byte arrays to/from XML, which is not portable. + +XML FormatMapper implementations were changed to now use a portable format for collections, maps and byte arrays. +This change is necessary to allow mapping basic arrays as `SqlTypes.XML_ARRAY`. + +The migration requires to read data and re-save it. + +To retain backwards compatibility, configure the setting `hibernate.type.xml_format_mapper.legacy_format` to `true`. + [[sf-name]] == SessionFactory Name (and JNDI)