php-mongomock
php-mongomock copied to clipboard
Add the $setOnInsert upsert operator
Additionally:
-
Emulating mongo behaviour for $set and $setOnInsert combined - https://stackoverflow.com/questions/23992723/findandmodify-fails-with-error-cannot-update-field1-and-field1-at-the-same/23994425#23994425
-
Emulating mongo behaviour for $inc: it should increment even a non-existing field