[SERVER-7557] Update doesn't support "$"s in the field (not at the start) Created: 05/Nov/12 Updated: 11/Jul/16 Resolved: 27/Jul/13 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Write Ops |
| Affects Version/s: | 2.0.6 |
| Fix Version/s: | 2.5.2 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Alex Piggott | Assignee: | Scott Hernandez (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
n/a |
||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||||||||||||||||||||||
| Description |
|
Added this in case it's not fixed in later mongodb releases (and I didn't see anything to suggest that it was) 1] This documentation page suggests that "$" characters should be allowed in the fieldname: http://www.mongodb.org/display/DOCS/Legal+Key+Names But: mongos> b = { "x": { "string $ string": "test" }} } ,{$set:b},true) 2] (This isn't just a shell thing, the issue was first noticed from the Java driver with equivalent code) 3] Note that it only occurs when the field is nested, eg the following works: mongos> b = { "string $ string": "test" } { "string $ string" : "test" }mongos> db.alex.update( { "_id" : ObjectId("5097edd36ab51b0eece55bb8")},{$set:b},true) 4] Note also that saving/inserting etc works fine, it's just for "update" |
| Comments |
| Comment by auto [ 23/Jul/13 ] |
|
Author: {u'username': u'scotthernandez', u'name': u'Scott Hernandez', u'email': u'scotthernandez@gmail.com'}Message: |