From 24738137c8cc6c6dd702de3882d8c87a6287e301 Mon Sep 17 00:00:00 2001 From: Michael Yang Date: Wed, 15 May 2024 11:26:14 +0800 Subject: [PATCH] fix: https://gitee.com/mybatis-flex/mybatis-flex/issues/I9P66C --- .../java/com/mybatisflex/core/table/TableInfo.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/mybatis-flex-core/src/main/java/com/mybatisflex/core/table/TableInfo.java b/mybatis-flex-core/src/main/java/com/mybatisflex/core/table/TableInfo.java index cb571919..b8c42f88 100644 --- a/mybatis-flex-core/src/main/java/com/mybatisflex/core/table/TableInfo.java +++ b/mybatis-flex-core/src/main/java/com/mybatisflex/core/table/TableInfo.java @@ -365,6 +365,16 @@ public class TableInfo { public String getColumnByProperty(String property) { String column = propertyColumnMapping.get(property); + // 用于兼容字段MM不规范的情况 + // fix https://gitee.com/mybatis-flex/mybatis-flex/issues/I9PDYO + if (column == null) { + for (Map.Entry entry : propertyColumnMapping.entrySet()) { + if (property.equalsIgnoreCase(entry.getKey())) { + column = entry.getValue(); + break; + } + } + } return StringUtil.isNotBlank(column) ? column : property; }