-
Type: Bug
-
Resolution: Done
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: Query
-
None
Running this query on any collection:
{non_existing_field: {$ne: null}}
will return no objects, since
The \{ item : null } query matches documents that either contain the item field whose value is null or that do not contain the item field
However, running
{$expr: {$and: [ { $ne: [ non_existing_field, null ] } ]}}
Returns all the fields from the collection- seems like it always returns true.