I want to add a new field to all documents in a collection. From within the meteor shell, I entered the following:
meteor:PRIMARY> db.myCollection.update({}, {$set: {newField: newValue}});
However, this was the response I got back, ie only one document in the collection was modified:
WriteResult({ "nMatched" : 1, "nUpserted" : 0, "nModified" : 1 })
Why was only one document modified? How can I update all documents in a collection?