[SERVER-5334] Return one element from an array that match with the query Created: 19/Mar/12 Updated: 20/Mar/12 Resolved: 20/Mar/12 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Sebastien Balant | Assignee: | Unassigned |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Participants: |
| Comments |
| Comment by Eliot Horowitz (Inactive) [ 20/Mar/12 ] |
|
See |
| Comment by Sebastien Balant [ 19/Mar/12 ] |
|
I have a collection with an array. Something like that: db.foo.find({_id: objectId, 'objects._id': objectId }, {_id: 1, 'objects.$': 1}) Thanks |