findAndModify
behaves exactly like update
. This means that the document in the database will be completely replaced by the document you provide, unless you use operators like $set
or $push
which explicitely modify a document.
By the way: When the node.js-specific documentation is too brief, the description of the analogue command in the general manual is often much more detailed.