[DOCS-16061] update documention wrong Created: 22/Apr/23 Updated: 30/Oct/23 Resolved: 05/May/23 |
|
| Status: | Closed |
| Project: | Documentation |
| Component/s: | manual, Server |
| Affects Version/s: | None |
| Fix Version/s: | Server_Docs_20231030 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Ma__rk Niel__sen | Assignee: | Jason Price |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
mongo 6, maybe earlier |
||
| Participants: | |
| Days since reply: | 41 weeks, 4 days ago |
| Description |
|
at https://www.mongodb.com/docs/manual/reference/method/db.collection.update/ where it mentions For example, the following update sets the upsert option to true:
does not work db.testdoc.update({person : "john2"}, {person : "john2", color: "blue", pencils : 21}} , {upsert: true });
does work color: Color value is invalid
} , {upsert: true }); |
| Comments |
| Comment by Ma__rk Niel__sen [ 22/Apr/23 ] |
|
Its not letting me copy to command. Let me change it.
db.testdoc.update({person : "john2"}, {$set : {color2: "blue", pencils : 21}} , {upsert: true }); |
| Comment by Ma__rk Niel__sen [ 22/Apr/23 ] |
|
sorry, this works using $set
db.testdoc.update({person : "john2"}, {$set : color: Color value is invalid
} , {upsert: true }); |