I have users
collection from this collection I need to fetch all the matching documents that either contain the name
field whose value is null
or that do not contain the name
field. I have tried a couple of ways but I did not get the expected output.
Query:
Users.objects(__raw__={ 'name': null })
This gives me an error NameError: name 'null' is not defined
Any idea how to fetch all the matching documents that either contains the name
field whose value is null
or that do not contain the name
field? Thank you in advance.