[SERVER-23563] $in setting positional operator ($) in an update query Created: 06/Apr/16 Updated: 14/Apr/16 Resolved: 06/Apr/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | 3.2.3 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | David Martinho | Assignee: | Kelsey Schubert |
| Resolution: | Done | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Operating System: | ALL |
| Participants: |
| Description |
|
Consider the following example:
This example changes the first tag name abc to ghi instead of the desired behavior of changing the tag with name def to ghi. I think the $in operator is setting the positional operator $, because if we change the query for "scopes" : { "$in" : ["b"]}, then the second tag is getting updated... |
| Comments |
| Comment by Kelsey Schubert [ 06/Apr/16 ] |
|
Hi davidmartinho, Thank you for the report. This behavior is expected and is documented here. In your example, two array elements are being queried. This results in ambiguity that we do not support since only one of these matches sets the value of "$". Consequently, we do not recommend, and soon will not allow ( Kind regards, |