Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-24789

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

XMLWordPrintable

    • False
    • None
    • False
    • Compatibility/Configuration, User Experience

      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.

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

                Created:
                Updated:
                Resolved: