update doc in mongoose.
Model.findOne({_id: '123'}, function (err, doc) {
// some conditions
doc.body = 'body';
doc.update(); //update the doc in db
});
The conditions are complex inline representation like MyModel.update({ age: { $gt: 18 } }, { oldEnough: true }, fn);
as shown in documentation
doc.update();
does not work. How do i make the document update, most efficiently?