Update with upsert: MongoDB
http://technotip.com/4159/update-with-upsert-mongodb/
Lets learn to use upsert option with update() method.
upsert basically inserts document into the collection, if there is no match found. If there is a match found, then the document simply gets updated — in which case upsert option will not have any effect on the selected document.
MongoDB Video Tutorial List:
http://technotip.com/3778/mongodb-tutorial-list/
Comments are closed.