Hi,
We use MongoDB C++ driver v1.1.0 and DB v3.2.11.
I am trying to bulk update entire document using find(key).updateOne(replacementDoc).
I am getting the following error -
Exception of type "mongo::UserException"
Message: update object must consist of $-prefixed modifiers
Any idea why it's expecting $-prefixed modifiers? I didn't want to use $set as some of the fields may not be present in the replacementDoc.
In which case, those fields should be absent in the updated document. So it's better to replace the entire document.
Thanks,
Sumanta