File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
src/main/java/org/javawebstack/orm/query Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -38,8 +38,10 @@ public QueryGroup<T> or(Function<QueryGroup<T>, QueryGroup<T>> group) {
3838 }
3939
4040 public QueryGroup <T > where (Object left , String condition , Object right ) {
41- if (right == null )
41+ if (condition . equalsIgnoreCase ( "=" ) && right == null )
4242 return whereNull (left );
43+ if (condition .equalsIgnoreCase ("!=" ) && right == null )
44+ return whereNotNull (left );
4345 if (queryElements .size () > 0 )
4446 queryElements .add (QueryConjunction .AND );
4547 queryElements .add (new QueryCondition (left instanceof String ? new QueryColumn ((String ) left ) : left , condition , right ));
@@ -99,8 +101,10 @@ public QueryGroup<T> greaterThan(Object left, Object right) {
99101 }
100102
101103 public QueryGroup <T > orWhere (Object left , String condition , Object right ) {
102- if (right == null )
104+ if (condition . equalsIgnoreCase ( "=" ) && right == null )
103105 return orIsNull (left );
106+ if (condition .equalsIgnoreCase ("!=" ) && right == null )
107+ return orNotNull (left );
104108 if (queryElements .size () > 0 )
105109 queryElements .add (QueryConjunction .OR );
106110 queryElements .add (new QueryCondition (left instanceof String ? new QueryColumn ((String ) left ) : left , condition , right ));
You can’t perform that action at this time.
0 commit comments