I'm trying to update a list of objects look like this:
var lista = [ { _id: 57ea29361b297553c99d702f,
nome: 'Meu nome',
__v: 0 },
{ _id: 57ea29371b297553c99d7031,
nome: 'Meu outro nome',
__v: 0 } ]
model.update({}, lista)
.then(function (result) {
console.log(result);
}, function (error) {
console.log(error);
});
But it returns me this:
{ok: 0, n: 0, nModified: 0}
If only one of the list works works
model.update({}, result[0])...
{ok: 1, nModified: 1, n: 1}