[SERVER-9385] Shell ignores modified object's "_id" field Created: 18/Apr/13 Updated: 11/Jul/16 Resolved: 18/Apr/13 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | JavaScript, Shell |
| Affects Version/s: | 2.4.2 |
| Fix Version/s: | 2.4.3, 2.5.0 |
| Type: | Bug | Priority: | Blocker - P1 |
| Reporter: | Ben McCann | Assignee: | Mathias Stearn |
| Resolution: | Done | Votes: | 1 |
| Labels: | bson, encoding | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||||||||||
| Issue Links: |
|
||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Description |
|
If an object is returned in the shell from a query (or any other way from the server) which is then modified the result will be that the "_id" field will be ignored when being sent to a mongodb server (in the bson encoding process). This is a bug in javascript (shell/client) but does not effect the server, other than the client not sending the _id field. It is possible to cause this behavior with javascript on the server using $eval (db.eval) or mapReduce, in the reduce phase if the first document in the array is modified (which is not a normal usage pattern). Orig Description http://stackoverflow.com/questions/16071342/reassign-mongodb-id-in-shell |
| Comments |
| Comment by auto [ 18/Apr/13 ] |
|
Author: {u'date': u'2013-04-18T12:42:40Z', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}Message: |
| Comment by Daniel Pasette (Inactive) [ 18/Apr/13 ] |
|
Planning on releasing 2.4.3 next week with this fix. |
| Comment by Ben McCann [ 18/Apr/13 ] |
|
Any idea when there will be a 2.4.3 release with the fix? |
| Comment by auto [ 18/Apr/13 ] |
|
Author: {u'date': u'2013-04-18T12:42:40Z', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}Message: |
| Comment by Eliot Horowitz (Inactive) [ 18/Apr/13 ] |
|
Bad commit is 1a6239025624c7660b65970d3258f1a242ab4512 |