How to use findByIdAndUpdate on mongodb2.4? How to use findByIdAndUpdate on mongodb2.4? mongoose mongoose

How to use findByIdAndUpdate on mongodb2.4?


Solve it by adding the $set operator:

OCase.findByIdAndUpdate(req.params.id, {        $set: {            subject: req.body.subject,            description: req.body.description,            currentStep: req.body.currentStep        }    }, callback);