lean()使うとできるようになる。
Item.findById(req.params.id).lean().exec(function(err, doc) {
...
});
doc.new = "Hi"
https://stackoverflow.com/questions/18554350/unable-to-add-properties-to-js-object
lean()使うとできるようになる。
Item.findById(req.params.id).lean().exec(function(err, doc) {
...
});
doc.new = "Hi"
https://stackoverflow.com/questions/18554350/unable-to-add-properties-to-js-object