[SERVER-1351] GLE upserted _id field should always be filled in Created: 02/Jul/10 Updated: 27/Oct/15 Resolved: 11/Oct/13 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Write Ops |
| Affects Version/s: | None |
| Fix Version/s: | 2.5.3 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Mathias Stearn | Assignee: | Scott Hernandez (Inactive) |
| Resolution: | Done | Votes: | 3 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||||||||||||||||||||||
| Issue Links: |
|
||||||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||||||
| Description |
|
the id isn't included in at least two cases where it probably should for consistency if the _id wasn't generated server-side: > db.foo.update( {a:'asdf'}, {_id: 'qwer'}, true) if the object already existed: > db.foo.update({_id:{$gt: ObjectId("4c2e342e38535540224f7945")}}, {$set: {a:'123'}}, true) > db.foo.update({_id:{$gt: ObjectId("4c2e342e38535540224f7945")}}, {$set: {a:'123'}}, true) |
| Comments |
| Comment by Scott Hernandez (Inactive) [ 11/Oct/13 ] |
|
For the docs we need to remove any mention that we return only an ObjectId, if that is in the docs anywhere else. Wrong info here: |
| Comment by auto [ 11/Oct/13 ] |
|
Author: {u'username': u'scotthernandez', u'name': u'Scott Hernandez', u'email': u'scotthernandez@gmail.com'}Message: |
| Comment by Scott Hernandez (Inactive) [ 27/Jul/13 ] |
|
Updated jstests/upsert1.js which fails (on both old and new update code) |