I am retrieving the ObjectId list and want to get the whole object in my mongo database using the $ all parameter
I am using pymongo and my query looks like this:
db.database.collection.find({ "_id" : { "$all" : [ObjectId('4ee371837c93dd33dc000003'),ObjectId('4eef9f647c93dd1a90000000')] } })
but the cursor count returned by the request is 0 but when I make this request:
db.database.collection.find_one({ "_id" : ObjectId('4ee371837c93dd33dc000003')})
He returns me a good object
Does anyone know why this is not working?
source share