milewise/mongode — Issue #2: Update the item in place with the newly created _id
Author: jmzrlz
Created: 2011-10-20 21:57:30+00:00
State: open

Using mongodb-native, if you create an object then insert it into a collection, it is automatically updated in-place and '_id' is set.

So for example, if you begin with:
x = { "a" : 5, "b" : 6}
After inserting, it will be:
x = {"_id" : someIDObject, "a": 5, "b" : 6}

However, when using mongode, this behaviour has been completely removed.

I'm requesting that you add it back as it is very useful when using the unique ID of each row after inserting it.