[SERVER-39963] order of find projection with field and dotted field changes results Created: 05/Mar/19 Updated: 05/Mar/19 Resolved: 05/Mar/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | 4.0.6, 4.1.8 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Roee Nizan | Assignee: | Eric Sedor |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
|||||||||||||||||||
| Operating System: | ALL | |||||||||||||||||||
| Steps To Reproduce: | Run this code using mongo shell on an empty server. This has the same results on server versions 4.0.6 and 4.1.8.
Output:
|
|||||||||||||||||||
| Participants: | ||||||||||||||||||||
| Description |
|
When querying documents, the order of the keys in the projection object change the results when it contains both a key and its sub-key. The reporter could not find documentation for this behavior, so it seems unintended. The reporter would expect all these projections to be equal:
|
| Comments |
| Comment by Eric Sedor [ 05/Mar/19 ] |
|
Thanks for your report allegroai; this issue is tracked in |