[SERVER-12079] Update using '$id', '$db', and '$ref' are acceptable field names in subdocs fails Created: 12/Dec/13 Updated: 07/Mar/14 Resolved: 12/Dec/13 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Write Ops |
| Affects Version/s: | 2.4.6, 2.5.4 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Jonathan Abrahams | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Standalone, OSX |
||
| Issue Links: |
|
||||
| Operating System: | ALL | ||||
| Participants: | |||||
| Description |
|
Test failure in QA-322/dollarsigns.js // Test that '$id', '$db', and '$ref' are acceptable field names in , { $set: { $id: 1, $db: 1, $ref: 1 }}); ); , { n: 0 }); coll.update( { n: 0 }, { $set: { 'x.$id': 1, 'x.$db': 1, 'x.$ref': 1 }}); ); , { n: 0 }); Assert thrown from second update: 2013-12-12T12:39:01.485-0500 assert failed : gleObj: { "err" : "The DBRef $db field must be a String, not a NumberDouble", "code" : 55, "n" : 0, "connectionId" : 171, "ok" : 1 }at src/mongo/shell/assert.js:7 |
| Comments |
| Comment by Scott Hernandez (Inactive) [ 12/Dec/13 ] |
|
This test is incorrect. The correct tests are checked into the server. Please read the DBRef docs to better understand why the test is incorect: http://docs.mongodb.org/manual/reference/database-references/#dbref |