[SERVER-7785] Cannot project embedded object field names prefixed with dollar sign Created: 28/Nov/12 Updated: 06/Dec/22 Resolved: 25/Apr/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | 2.2.1 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Jeremy Mikola | Assignee: | Backlog - Query Team (Inactive) |
| Resolution: | Done | Votes: | 2 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Assigned Teams: |
Query
|
||||||||
| Operating System: | ALL | ||||||||
| Participants: | |||||||||
| Description |
|
After
The reproduction steps are a bit contrived, but the practical use case is a projection of the $id field of a DBRef object. |
| Comments |
| Comment by Ramon Fernandez Marina [ 25/Apr/16 ] | ||
|
Looks like this behavior went away in 2.6.0, most probably due to the rewrite of the query subsystem for MongoDB 2.6, so I'm closing this ticket. | ||
| Comment by Asya Kamsky [ 25/Apr/16 ] | ||
|
I'm not sure as of which version, but in 3.0.4, 3.2.4 and 3.3.4 the find with projection works:
| ||
| Comment by Johan De Meersman [ 19/Jan/16 ] | ||
|
Another, possibly more common usecase, is selecting in db.system.profiles inside the command.query document, which almost always holds $ operators as keys. |