I want to find a document using a conditional if the key == None or if the key doesn't exist. Something like this:
myDoc = self.request.root.db.myDocs.find_one({
'$or': [
{'myKey' : $doesNotExist } ,
{'myKey' : None }
]
})
I'd also like to be able to find a document just by a missing key like this:
myDoc = self.request.root.db.myDocs.find_one( {'myKey' : $doesNotExist } )
How can I accomplish this?