How can I detect number of mached and changed documents in an UPDATE statement?
Like mongodb
WriteResult.
nMatched
The number of documents selected for update. If the update operation results in no change to the document, e.g. $set
expression updates the value to the current value, nMatched
can be greater than nModified
.
WriteResult.
nModified
The number of existing documents updated. If the update/replacement operation results in no change to the document, such as setting the value of the field to its current value, nModified
can be less than nMatched
.