Open alansikora opened 7 years ago
I had to remove $setOnInsert from MongoClient because that would cause updates to never work.
As stated here: https://docs.mongodb.com/manual/reference/operator/update/setOnInsert/
If an update operation with upsert: true results in an insert of a document, then $setOnInsert assigns the specified values to the fields in the document. If the update operation does not result in an insert, $setOnInsert does nothing.
Am I missing something?
I had to remove $setOnInsert from MongoClient because that would cause updates to never work.
As stated here: https://docs.mongodb.com/manual/reference/operator/update/setOnInsert/
If an update operation with upsert: true results in an insert of a document, then $setOnInsert assigns the specified values to the fields in the document. If the update operation does not result in an insert, $setOnInsert does nothing.
Am I missing something?