In a server side method I am updating one document. The method call returns 1, so it’s telling me it has updated 1 document. But looking into the mongodb this is not true!
So this is my update call:
const updateCount = Requests.update({
_id: 'fooId',
}, {
$set: {
foo: 'bar'
},
})
console.log(updateCount) // 1
However, when I do the call directly on mongodb it works properly!
db.getCollection('requests').update({
_id: 'fooId',
}, {
$set: {
foo: 'bar'
},
})
I’m going crazy … I don’t get it!
Any idea?
BTW: I’m using Meteor 1.6.0