[DOCS-3602] It would be nice to clarify the behaviour when using $addToSet to add subdocuments to an array Created: 16/Jun/14 Updated: 16/Mar/15 Resolved: 27/Jun/14 |
|
| Status: | Closed |
| Project: | Documentation |
| Component/s: | manual |
| Affects Version/s: | None |
| Fix Version/s: | v1.3.7 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Linda Qin | Assignee: | Kay Kim (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Participants: | |||||
| Days since reply: | 9 years, 33 weeks, 5 days ago | ||||
| Description |
|
Currently MongoDB compares the subdocuments by comparing the BSON data, and it doesn’t check the contents in the subdocuments. So when you use $addToSet to add subdocuments to an array, if the order of the fields in the subdocuments are different, they would be considered as different documents even if the values for all the fields in the subdocuments are the same. It would be nice to document this behaviour for $addToSet |
| Comments |
| Comment by Githook User [ 27/Jun/14 ] |
|
Author: {u'username': u'kay-kim', u'name': u'kay', u'email': u'kay.kim@10gen.com'}Message: |