Browse Source

修正反向判断

miemie 5 năm trước cách đây
mục cha
commit
2c0de14ef2

+ 2 - 2
mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/core/metadata/TableFieldInfo.java

@@ -175,7 +175,7 @@ public class TableFieldInfo implements Constants {
             column = String.format(columnFormat, column);
         }
         this.column = column;
-        if (TableInfoHelper.checkRelated(tableInfo.isUnderCamel(), this.property, this.column)) {
+        if (!TableInfoHelper.checkRelated(tableInfo.isUnderCamel(), this.property, this.column)) {
             this.sqlSelect = column;
         } else {
             String propertyFormat = dbConfig.getPropertyFormat();
@@ -250,7 +250,7 @@ public class TableFieldInfo implements Constants {
         }
 
         this.column = column;
-        if (TableInfoHelper.checkRelated(tableInfo.isUnderCamel(), this.property, this.column)) {
+        if (!TableInfoHelper.checkRelated(tableInfo.isUnderCamel(), this.property, this.column)) {
             this.sqlSelect = column;
         } else {
             String propertyFormat = dbConfig.getPropertyFormat();