Forráskód Böngészése

调整判断逻辑顺序

hubin 5 éve
szülő
commit
97fc7b1ed4

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

@@ -361,7 +361,7 @@ public class TableInfo implements Constants {
      * 自动构建 resultMap 并注入(如果条件符合的话)
      */
     void initResultMapIfNeed() {
-        if (resultMap == null && autoInitResultMap) {
+        if (autoInitResultMap && null == resultMap) {
             String id = currentNamespace + DOT + MYBATIS_PLUS + UNDERSCORE + entityType.getSimpleName();
             List<ResultMapping> resultMappings = new ArrayList<>();
             if (keyType != null) {