[SERVER-89] Cannot select only sub-fields to return Created: 02/Jun/09 Updated: 12/Jul/16 Resolved: 02/Jul/09 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Usability |
| Affects Version/s: | None |
| Fix Version/s: | 0.9.6 |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | Michael Dirolf | Assignee: | Eliot Horowitz (Inactive) |
| Resolution: | Done | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Participants: |
| Description |
|
there ought to be a way to select only the x.y field to be returned. using {x: {y: 1}} returns both x.y and x.z and using {"x.y": 1}returns nothing at all. > db.bar.find() , w: 2}) ) |
| Comments |
| Comment by Eliot Horowitz (Inactive) [ 10/Jul/09 ] |
|
closed since 0.9.6 went out |
| Comment by Stephen Haynes [ 02/Jul/09 ] |
|
Thanks for implementing this. I've had a chance to do some testing with this and it appears to work fine with one x.y field but fails when more than one is selected by returning more than expected. I noticed there is a test case but it will obviously continue to pass in this situation. e.g. > db.find5.find() ) ) |
| Comment by Eliot Horowitz (Inactive) [ 02/Jul/09 ] |
|
implemented as find( {} , { "a.b.c" : 1 }); |