summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2010-03-01 10:27:19 -0500
committerEliot Horowitz <eliot@10gen.com>2010-03-01 10:27:19 -0500
commit165b9c3ea5f0626bda36edb4f44aeeb9f3412e74 (patch)
tree1c3238052bf5ae3848073a231c2bcb98e3f36a98
parent2ea2c01ba5455bfc3f494a673adb8f29b1f41208 (diff)
downloadmongo-165b9c3ea5f0626bda36edb4f44aeeb9f3412e74.tar.gz
write ops can't return or getLastError won't be called
-rw-r--r--shell/collection.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/shell/collection.js b/shell/collection.js
index 0b924905d8b..ae13ca5c150 100644
--- a/shell/collection.js
+++ b/shell/collection.js
@@ -163,7 +163,7 @@ DBCollection.prototype.insert = function( obj , _allow_dot ){
}
}
this._mongo.insert( this._fullName , obj );
- return obj._id;
+ this.lastID = obj._id;
}
DBCollection.prototype.remove = function( t ){