[SERVER-20127] Operator $or(query) and operator $(projection) don't work together. Created: 26/Aug/15 Updated: 08/Oct/15 Resolved: 08/Oct/15 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | 3.0.4 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Roman | Assignee: | Wan Bachtiar |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Operating System: | ALL |
| Participants: |
| Description |
|
QUERY:
ERROR: |
| Comments |
| Comment by Wan Bachtiar [ 08/Oct/15 ] |
|
Hi Roman, Thanks for the report. This behaviour is mentioned in the MongoDB documentation as a limitation of positional projection: http://docs.mongodb.org/manual/reference/operator/projection/positional/#array-field-limitation The query document can only contain a single condition on the array field being projected. In your case, the $or operator states multiple conditions on the array field, which could override each other internally and lead to undefined behaviour. Regards, Wan. |