Skip to content

Commit 9de9afe

Browse files
committed
HHH-16160 Fix some XML related issues that came up
1 parent 57142a8 commit 9de9afe

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

migration-guide.adoc

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -315,10 +315,10 @@ The default precision for SQL Server timestamps was changed to 7 i.e. 100 nanose
315315

316316
Note that these changes only affect DDL generation.
317317

318-
[[array-mapping-changes-on-db2-sap-hana-and-sybase-ase]]
319-
== Array mapping changes on DB2, SAP HANA and Sybase ASE
318+
[[array-mapping-changes-on-db2-sap-hana-sql-server-and-sybase-ase]]
319+
== Array mapping changes on DB2, SAP HANA, SQL Server and Sybase ASE
320320

321-
On DB2, SAP HANA and Sybase ASE, basic arrays now map to the `SqlTypes.XML_ARRAY` type code,
321+
On DB2, SAP HANA, SQL Server and Sybase ASE, basic arrays now map to the `SqlTypes.XML_ARRAY` type code,
322322
whereas previously, the dialect mapped arrays to `SqlTypes.VARBINARY`.
323323
The `SqlTypes.XML_ARRAY` type uses the `xml` DDL type which enables using arrays in other features through the various XML functions.
324324

@@ -338,6 +338,19 @@ The migration requires to read data and re-save it.
338338

339339
To retain backwards compatibility, configure the setting `hibernate.type.preferred_array_jdbc_type` to `VARBINARY`.
340340

341+
[[xml-format-mapper-changes]]
342+
== XML FormatMapper changes
343+
344+
Previous versions of Hibernate ORM used an undefined/provider-specific format for serialization/deserialization of
345+
collections, maps and byte arrays to/from XML, which is not portable.
346+
347+
XML FormatMapper implementations were changed to now use a portable format for collections, maps and byte arrays.
348+
This change is necessary to allow mapping basic arrays as `SqlTypes.XML_ARRAY`.
349+
350+
The migration requires to read data and re-save it.
351+
352+
To retain backwards compatibility, configure the setting `hibernate.type.xml_format_mapper.legacy_format` to `true`.
353+
341354
[[sf-name]]
342355
== SessionFactory Name (and JNDI)
343356

0 commit comments

Comments
 (0)