From: MakotoHirano Date: Fri, 18 Nov 2016 08:35:45 +0000 (+0900) Subject: fix query can automatically treat null clause depends on value X-Git-Tag: release-2.2.0~12^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c01feb79be8ca444a704dc20b0859295289fd524;p=iciql.git fix query can automatically treat null clause depends on value --- diff --git a/src/main/java/com/iciql/QueryCondition.java b/src/main/java/com/iciql/QueryCondition.java index fce66af..56de976 100644 --- a/src/main/java/com/iciql/QueryCondition.java +++ b/src/main/java/com/iciql/QueryCondition.java @@ -60,7 +60,11 @@ public class QueryCondition { } public QueryWhere is(A y) { - query.addConditionToken(new Condition(x, y, CompareType.EQUAL)); + if (y == null) { + query.addConditionToken(new Condition(x, CompareType.IS_NULL)); + } else { + query.addConditionToken(new Condition(x, y, CompareType.EQUAL)); + } return new QueryWhere(query); }