-
Type: Bug
-
Resolution: Works as Designed
-
Priority: Major - P3
-
None
-
Affects Version/s: 3.11.3
-
Component/s: API
-
None
-
Environment:ubuntu 20.0.4, python 3.8, mongodb 4.4
I think there is a problem with projection parameter in find() method
client = MongoClient() filter={} project={} result = client['my_db']['my_collection'].find( filter=filter, projection=project ) ##### It will return "_id" field of the documents only
I also use the Mongo compass tool to generate this code. But it returns the full-fields results of documents for me, maybe it is due to the compatibility of this tool and pymongo
- duplicates
-
PYTHON-1853 Empty projections should return the entire document not just the _id
- Closed