[SERVER-6527] in projection implementation, dotted field inclusion supersedes parent field inclusion Created: 19/Jul/12 Updated: 09/Mar/20 Resolved: 16/Nov/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | 2.0.6, 2.6.3 |
| Fix Version/s: | 4.3.2 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Aaron Staple | Assignee: | Ian Boros |
| Resolution: | Done | Votes: | 1 |
| Labels: | query-44-grooming | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||
| Backwards Compatibility: | Minor Change | ||||||||||||||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||||||||||||||
| Sprint: | Query 2019-11-04, Query 2019-11-18, Query 2019-12-02 | ||||||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||||||
| Description |
|
Observed behavior: In the query projection implementation, the projection { a:1, 'a.b':1 }is equivalent to { 'a.b':1 }not { a:1 } (at least in some cases). is equivalent to { a:1 }. Test:
|
| Comments |
| Comment by Githook User [ 15/Nov/19 ] | |||||
|
Author: {'username': 'puppyofkosh', 'email': 'ian.boros@mongodb.com', 'name': 'Ian Boros'}Message: | |||||
| Comment by Asya Kamsky [ 09/Oct/17 ] | |||||
|
Same in 3.5.13 - when there are multiple projections for same field, the last one wins (so 'a.b':1 followed by a:1 is equivalent to just a:1). | |||||
| Comment by Thomas Rueckstiess [ 29/Jul/14 ] | |||||
|
Confirmed in 2.6.3. | |||||
| Comment by Aaron Staple [ 25/Aug/12 ] | |||||
|
Also
|