[DOCS-1823] Issues about mongodb array and subdocument Created: 19/Aug/13 Updated: 03/Nov/17 Resolved: 19/Aug/13 |
|
| Status: | Closed |
| Project: | Documentation |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 01112017-cleanup |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | auto | Assignee: | Barrie Segal |
| Resolution: | Done | Votes: | 0 |
| Labels: | collector-298ba4e7 | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
windows server 2008 r2 + mongodb-win32-x86_64-2.4.5 Location: http://docs.mongodb.org/manual/ |
||
| Participants: | |
| Days since reply: | 10 years, 26 weeks, 3 days ago |
| Description |
|
First, I have test this on db "test" with auth login, I have create a collection "entities" and then insert a record like this "var single = { "id" : 123, "person" : [ { "birthday" : "12/3/2013" } ] };". );", why? Instead, I can use another command to show record: "var record = db.entities.findOne( {"person.birthday": "12/3/2013"});". I think the value of person should be an array, so I can use person[0], but it seems like does not work. Reporter: Kevin Zhang |