SHARE

Hey ninjas, in this MongoDB tutorial for beginners, we’ll take a look how to update records already saved to the database using update() and findOneAndUpdate().

—– COURSE LINKS:
+ Repo – https://github.com/iamshaunjp/mongodb-playlist
+ Atom editor – https://atom.io/a
+ Download GIT – https://git-scm.com/
+ CMDER – http://cmder.net/
+ MongoDB – https://www.mongodb.com/
+ Robomongo – https://robomongo.org/

JS Playlist – https://www.youtube.com/playlist?list=PL4cUxeGkcC9i9Ae2D9Ee1RvylH38dKuET

NODEJS Playlist – https://www.youtube.com/playlist?list=PL4cUxeGkcC9gcy9lrvMJ75z9maRw4byYp

ASYNC JS Playlist – https://www.youtube.com/playlist?list=PL4cUxeGkcC9jAhrjtZ9U93UMIhnCc44MH

———————————————————————————————
You can find more front-end development tutorials on CSS, HTML, JavaScript, jQuery, WordPress, Node.js & more on the channel homepage…

SUBSCRIBE TO CHANNEL – https://www.youtube.com/channel/UCW5YeuERMmlnqo4oq8vwUpg?sub_confirmation=1

========== PSD to WordPress Playlist ==========

https://www.youtube.com/playlist?list=PL4cUxeGkcC9gnow7e45LQFkNVxwQ5BH-W

============ Node.js for Beginners Playlist =============

https://www.youtube.com/playlist?list=PL4cUxeGkcC9gcy9lrvMJ75z9maRw4byYp

============== The Net Ninja =====================

For more front-end development tutorials & to black-belt your coding skills, head over to – https://www.youtube.com/channel/UCW5YeuERMmlnqo4oq8vwUpg or http://thenetninja.co.uk

================== Social Links ==================

Twitter – @TheNetNinja – https://twitter.com/thenetninjauk

1 COMMENT

  1. Hi Ninjamaster! It fails when running :
    db.mariochars.findOneAndUpdate({name:"Mario"}, {"name":"Luigi"});
    in mongo shell, it says
    "Error: the update operation document must contain atomic operators ……"
    But this one works:
    db.mariochars.findOneAndUpdate({name:"Mario"}, {$set: {"name":"Luigi"}});

LEAVE A REPLY

Please enter your comment!
Please enter your name here