mirror of
https://gitee.com/mybatis-flex/mybatis-flex.git
synced 2025-12-07 00:58:24 +08:00
feat: -m core 优化关联查询使用逗号分割时排除空值
This commit is contained in:
parent
41b52fa6c2
commit
01ab3023df
@ -74,6 +74,10 @@ public class ToManyRelation<SelfEntity> extends AbstractRelation<SelfEntity> {
|
||||
}
|
||||
String[] splitValues = ((String) targetValue).split(selfValueSplitBy);
|
||||
for (String splitValue : splitValues) {
|
||||
// 排除空值
|
||||
if (splitValue == null || splitValue.length() == 0) {
|
||||
continue;
|
||||
}
|
||||
//优化分割后的数据类型(防止在数据库查询时候出现隐式转换)
|
||||
newTargetValues.add(ConvertUtil.convert(splitValue, targetFieldWrapper.getFieldType()));
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user