From af0d12f400c863a8a6414fbe64b379c3109810a1 Mon Sep 17 00:00:00 2001 From: Joram Barrez Date: Fri, 14 Jun 2024 16:28:31 +0200 Subject: [PATCH] Fix failing tests --- .../common/engine/impl/AbstractEngineConfiguration.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/AbstractEngineConfiguration.java b/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/AbstractEngineConfiguration.java index 18fe91b33a0..d856ba9b0b2 100755 --- a/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/AbstractEngineConfiguration.java +++ b/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/AbstractEngineConfiguration.java @@ -940,11 +940,15 @@ public void initMybatisTypeHandlers(Configuration configuration) { // Together with this check, all mappings were reviewed and the correct type was added. if (databaseType.equals(DATABASE_TYPE_MSSQL)) { handlerRegistry.register(Object.class, JdbcType.VARCHAR, new StringTypeHandler()); + handlerRegistry.register(String.class, JdbcType.VARCHAR, new StringTypeHandler()); handlerRegistry.register(Object.class, JdbcType.NVARCHAR, new NStringTypeHandler()); // Notice the 'N' prefix here + handlerRegistry.register(String.class, JdbcType.NVARCHAR, new NStringTypeHandler()); // Notice the 'N' prefix here } else { // However, for other databases, we want to keep the old behavior of always using 'varchar', // thus the same handler is used for both types. + handlerRegistry.register(String.class, JdbcType.VARCHAR, new StringTypeHandler()); handlerRegistry.register(Object.class, JdbcType.VARCHAR, new StringTypeHandler()); + handlerRegistry.register(String.class, JdbcType.NVARCHAR, new StringTypeHandler()); // Notice: no 'N' prefix here handlerRegistry.register(Object.class, JdbcType.NVARCHAR, new StringTypeHandler()); // Notice: no 'N' prefix here }