[DOCS-1985] Typo in $addToSet page Created: 20/Sep/13  Updated: 11/Jan/17  Resolved: 24/Sep/13

Status: Closed
Project: Documentation
Component/s: None
Affects Version/s: None
Fix Version/s: 01112017-cleanup

Type: Task Priority: Major - P3
Reporter: Siyuan Zhou Assignee: Sam Kleinman (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:
Days since reply: 10 years, 21 weeks, 1 day ago

 Description   

In the first command example:

db.collection.update( { field: value }, { $addToSet: { field: value1 } } );

The first value should be value1, according to its explanation.



 Comments   
Comment by Sam Kleinman (Inactive) [ 24/Sep/13 ]

I clarified the example a bit, but we can probably be do better with examples for the use of all operators. This might be a larger project for another ticket.

Comment by auto [ 24/Sep/13 ]

Author:

{u'username': u'tychoish', u'name': u'Sam Kleinman', u'email': u'samk@10gen.com'}

Message: DOCS-1985: clarifying example
Branch: master
https://github.com/mongodb/docs/commit/a2165c2f5556ef77cd38eefb75c7891509ed0788

Comment by Kay Kim (Inactive) [ 20/Sep/13 ]

Adding. I think Siyuan's comments are valid and I too misread the page and immediately thought the page had an error.

Comment by Siyuan Zhou [ 20/Sep/13 ]

Sorry, I misunderstood it. But it is a little confusing that in the example both field names in query criteria and update are field.

Generated at Thu Feb 08 07:42:24 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.