[SERVER-1095] findandmodify doesn't support positional ($) operator Created: 06/May/10 Updated: 12/Jul/16 Resolved: 11/May/10 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | 1.4.2 |
| Fix Version/s: | 1.5.2 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | PowerMeMobile | Assignee: | Mathias Stearn |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Ubuntu 9.10 (on VMWare 6.5.1 under Windows 7) |
||
| Participants: |
| Description |
|
Please, consider the following use case: , {Name: "Culture", Rate : 2 }] }) , update : { $set : { "TagDesc.$.Name" : "Economics" } } }) , { "Name" : "Culture", "Rate" : 2 } ] server console output: exception userassert:can't append to array using string field name 0ms The object was not changed , { "Name" : "Culture", "Rate" : 2 }] } Note that at this time we specified index of item manually instead of using positional operator ( "TagDesc.$.Name" -> "TagDesc.1.Name" ). , update : { $set : { "TagDesc.1.Name" : "Economics" } } }) , { "Name" : "Culture", "Rate" : 2 } ] , { "Name" : "Economics", "Rate" : 2 }], "_id" : ObjectId("4bda64d1967d194e851b03ed") } |
| Comments |
| Comment by auto [ 11/May/10 ] |
|
Author: {'login': 'RedBeard0531', 'name': 'Mathias Stearn', 'email': 'mathias@10gen.com'}Message: Support $ positional operator with findAndModify |