What is the correct way to query MongoDB for _id using string by using Python?

前端 未结 5 1700
闹比i
闹比i 2021-02-05 02:00

I am using pymongo driver. Supposedly, one can use a string to query the _id field of a document, like this:

thing = db.things.find_one({\'_id\':\'4ea113d6b6848         


        
5条回答
提交回复
热议问题