Bladeren bron

没有初始化下划线转驼峰属性

Caratacus 6 jaren geleden
bovenliggende
commit
7de0e29f7e

+ 1 - 1
mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/core/metadata/TableInfo.java

@@ -101,7 +101,7 @@ public class TableInfo {
     /**
      * 是否开启下划线转驼峰
      */
-    private boolean underCamel;
+    private boolean underCamel = true;
     /**
      * 标记该字段属于哪个类
      */

+ 1 - 0
mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/core/toolkit/TableInfoHelper.java

@@ -159,6 +159,7 @@ public class TableInfoHelper {
         if (null != builderAssistant) {
             tableInfo.setCurrentNamespace(builderAssistant.getCurrentNamespace());
             tableInfo.setConfigMark(builderAssistant.getConfiguration());
+            tableInfo.setUnderCamel(builderAssistant.getConfiguration().isMapUnderscoreToCamelCase());
             globalConfig = GlobalConfigUtils.getGlobalConfig(builderAssistant.getConfiguration());
         } else {
             // 兼容测试场景