diff --git a/mybatis-flex-core/src/test/java/com/mybatisflex/coretest/DynamicConditionTest.java b/mybatis-flex-core/src/test/java/com/mybatisflex/coretest/DynamicConditionTest.java index 0d18aa94..f52b10bd 100644 --- a/mybatis-flex-core/src/test/java/com/mybatisflex/coretest/DynamicConditionTest.java +++ b/mybatis-flex-core/src/test/java/com/mybatisflex/coretest/DynamicConditionTest.java @@ -133,11 +133,11 @@ public class DynamicConditionTest { @Test public void test08() { - QueryWrapper queryWrapper = QueryWrapper.create(). - from(ACCOUNT) + QueryWrapper queryWrapper = QueryWrapper.create() + .from(ACCOUNT) .where(ACCOUNT.ID.eq(1) .and(ACCOUNT.AGE.in(17, 18, 19).or(ACCOUNT.USER_NAME.eq("zhang san")) - )); + )); QueryCondition condition = CPI.getWhereQueryCondition(queryWrapper); while (condition != null) { @@ -148,4 +148,16 @@ public class DynamicConditionTest { System.out.println(queryWrapper.toSQL()); } + @Test + public void test09() { + QueryColumnBehavior.setIgnoreFunction(e -> e == null || "".equals(e)); + QueryColumnBehavior.setSmartConvertInToEquals(false); + + QueryWrapper queryWrapper = QueryWrapper.create() + .from(ACCOUNT) + .where(ACCOUNT.USER_NAME.in( "")); + + System.out.println(queryWrapper.toSQL()); + } + }