Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-17914

Upgrade to Hibernate 6.2.2.final release that maps Character[]/Byte[] to SQL Array by default unless DB doesn't allow

    XMLWordPrintable

Details

    • Compatibility/Configuration, User Experience
    • ---
    • ---

    Description

      Release note is at https://in.relation.to/2023/04/28/hibernate-orm-622-final/
      Changes are shown here https://github.com/hibernate/hibernate-orm/compare/6.2.1...6.2.2

      Currently, WildFly sets "hibernate.type.wrapper_array_handling" to "legacy" for all Jakarta Persistence (JPA) applications that do not specify a "hibernate.type.wrapper_array_handling" setting. The "legacy" setting means that the SQL ARRAY database type is not supported for any database.

      The preferred approach is to automatically enable SQL ARRAY database type for databases that support SQL ARRAY and disable it for databases that do not support SQL ARRAY. More specifically, for databases that support SQL ARRAY, it is preferred that Hibernate ORM map the (Java) Character[]/Byte[] type to SQL ARRAY database type. For databases that do not support SQL ARRAY, it is preferred that Hibernate ORM map the (Java) Character[]/Byte[] type the same as (Java) char[]/byte[] would be be mapped.

      https://hibernate.atlassian.net/browse/HHH-16481 is for improving Hibernate ORM to default to map (Java) Character[]/Byte[] to SQL ARRAY database type, if and only if the underlying database supports SQL ARRAY database type.

      https://github.com/hibernate/hibernate-orm/pull/6418 is the current code change for the Hibernate ORM main branch.

      When we bring the https://github.com/hibernate/hibernate-orm/pull/6418 change into WildFly/EAP, we will at the same time revert the https://github.com/wildfly/wildfly/commit/5678e20147204066cd3e5b3c82d6093b7e42ce87 (sets hibernate.type.wrapper_array_handling=legacy) change which is incorrect for those databases that support SQL ARRAY type.

      Attachments

        Issue Links

          Activity

            People

              smarlow1@redhat.com Scott Marlow
              smarlow1@redhat.com Scott Marlow
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: