-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 1.11
-
Component/s: None
-
None
>>> test = pymongo.Connection().test.test
>>> test.insert(
)
ObjectId('4e0509dce4721c2217000000')
>>> test.find_and_modify({}, {'$inc': {'a': 1}})
{u'a': 1, u'_id': ObjectId('4e0509dce4721c2217000000')}>>> test.find_and_modify({}, {'$inc': {'a': 1}}, fields=['a'])
{u'_id': ObjectId('4e0509dce4721c2217000000')}As soon as you pass a `fields` option only the _id field is returned.