-
Type: Bug
-
Resolution: Done
-
Priority: Critical - P2
-
None
-
Affects Version/s: 1.8.2
-
Component/s: None
-
None
-
ALL
1) > db.test.find()
{ "_id" : ObjectId("4e04e3d79c57c1b8fe3830af"), "v" : 11 }2) > db.test.findAndModify({query: {}, update: {'$inc': {v: 1}}, new: true})
{ "_id" : ObjectId("4e04e3d79c57c1b8fe3830af"), "v" : 12 }3) > db.test.findAndModify({query: {}, update: {'$inc': {v: 1}}, new: true, fields: ['v']})
{ "_id" : ObjectId("4e04e3d79c57c1b8fe3830af") }Output of 3) should contain the 'v' field.
Same thing with the Python driver; with new=False and with multiple fields.