This commit is contained in:
Ari Lazier 2016-04-11 16:03:36 -07:00
parent b542fe8c7b
commit 321ddc39e1

View File

@ -430,6 +430,7 @@ void do_add_null_comparison_to_query(Query &query, Predicate::Operator op, const
switch (op) { switch (op) {
case Predicate::Operator::NotEqual: case Predicate::Operator::NotEqual:
query.and_query(column != realm::null()); query.and_query(column != realm::null());
break;
case Predicate::Operator::Equal: case Predicate::Operator::Equal:
query.and_query(column == realm::null()); query.and_query(column == realm::null());
break; break;
@ -446,6 +447,7 @@ void do_add_null_comparison_to_query<Binary>(Query &query, Predicate::Operator o
switch (op) { switch (op) {
case Predicate::Operator::NotEqual: case Predicate::Operator::NotEqual:
query.not_equal(expr.prop->table_column, realm::null()); query.not_equal(expr.prop->table_column, realm::null());
break;
case Predicate::Operator::Equal: case Predicate::Operator::Equal:
query.equal(expr.prop->table_column, realm::null()); query.equal(expr.prop->table_column, realm::null());
break; break;