[SERVER-28556] positional operator in projection fails when combined with other array fields Created: 30/Mar/17 Updated: 31/May/17 Resolved: 04/May/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Mor [X] | Assignee: | Mark Agarunov |
| Resolution: | Incomplete | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Operating System: | ALL | |
| Steps To Reproduce: | 1. Create a collection with documents containing to array fields with inner documents in each.
|
|
| Participants: |
| Description |
|
Combining a positional operator in the projection with some other array dotted field returns: Example:
returns the error message.
returns the expected result. According to the docs at:
But there is no similar limit on the projection document. |
| Comments |
| Comment by Mark Agarunov [ 04/May/17 ] | |
|
Hello Marmor, We haven’t heard back from you for some time, so I’m going to mark this ticket as resolved. If this is still an issue for you, please provide additional information and we will reopen the ticket. Thanks, | |
| Comment by Ramon Fernandez Marina [ 31/Mar/17 ] | |
|
Marmor, in what version of MongoDB are you seeing this behavior? | |
| Comment by Mor [X] [ 30/Mar/17 ] | |
|
A workaround is to use $elemMatch in the projection, and copy the same element query document used in the query for the projection, that works but cumbersome.
|