Closed Taler-zz closed 13 years ago
The intention is for the findAndModify to match the mongodb shell with node.js-style function(err,result) callbacks. Most of the method documentation is word-for-word from Mongo's shell documentation.
In this case it looks like your code is correct except for the callback should have an error argument first.
I must admit I haven't used findAndModify myself (I'm just passing the arguments to the mongodb server based on their mongo shell code and driver spec). If you do get it working, a unit test or even just a documentation example would be greatly appreciated.
Oh that works just fine. Gracias.
Attempt at doc.
I want to find a document, update it, and return it. Your documentation is a tad unclear.
Trying this: