mirror of
https://gitee.com/mybatis-flex/mybatis-flex.git
synced 2025-12-08 01:28:24 +08:00
This commit is contained in:
parent
2441da3c70
commit
24738137c8
@ -365,6 +365,16 @@ public class TableInfo {
|
|||||||
|
|
||||||
public String getColumnByProperty(String property) {
|
public String getColumnByProperty(String property) {
|
||||||
String column = propertyColumnMapping.get(property);
|
String column = propertyColumnMapping.get(property);
|
||||||
|
// 用于兼容字段MM不规范的情况
|
||||||
|
// fix https://gitee.com/mybatis-flex/mybatis-flex/issues/I9PDYO
|
||||||
|
if (column == null) {
|
||||||
|
for (Map.Entry<String, String> entry : propertyColumnMapping.entrySet()) {
|
||||||
|
if (property.equalsIgnoreCase(entry.getKey())) {
|
||||||
|
column = entry.getValue();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
return StringUtil.isNotBlank(column) ? column : property;
|
return StringUtil.isNotBlank(column) ? column : property;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user