the-magical-marvels-of-mongodb-slides
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Update Without an Operator<br />
If <strong>the</strong> update parameter consists <strong>of</strong> only field/value pairs, <strong>the</strong>n everything but <strong>the</strong> _id is<br />
replaced in <strong>the</strong> matching document.<br />
Name:<br />
“Love”<br />
Document replaced with <strong>the</strong><br />
update parameter<br />
Vendor:<br />
“Brewers”<br />
Update<br />
Price: 3.99<br />
Price: 40.99<br />
...<br />
Useful for<br />
importing data<br />
> db.potions.update(<br />
{"name": "Love"},<br />
{"price": 3.99 }<br />
).<br />
SHELL<br />
No operator, just field/value pair