summaryrefslogtreecommitdiff
path: root/shell/collection.js
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2009-02-06 12:31:24 -0500
committerEliot Horowitz <eliot@10gen.com>2009-02-06 12:31:24 -0500
commitd2801728edf7ddc045075c3a5c3abcac3decab3a (patch)
treeb2f7451b0bbae6afeefd48937298d7c63d30a3e2 /shell/collection.js
parentc9bc5b0baa195154c6d4e4eba9dbcf16e0bc4bab (diff)
downloadmongo-d2801728edf7ddc045075c3a5c3abcac3decab3a.tar.gz
it get mapped to last result
Diffstat (limited to 'shell/collection.js')
-rw-r--r--shell/collection.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/shell/collection.js b/shell/collection.js
index 515950f178b..e81cc205b93 100644
--- a/shell/collection.js
+++ b/shell/collection.js
@@ -105,7 +105,7 @@ DBCollection.prototype.insert = function( obj ){
if ( ! obj )
throw "no object!";
this._validateForStorage( obj );
- this._mongo.insert( this._fullName , obj );
+ return this._mongo.insert( this._fullName , obj );
}
DBCollection.prototype.remove = function( t ){
@@ -120,10 +120,10 @@ DBCollection.prototype.update = function( query , obj , upsert ){
DBCollection.prototype.save = function( obj ){
if ( ! obj._id ){
- this.insert( obj );
+ return this.insert( obj );
}
else {
- this.update( { _id : obj._id } , obj , true );
+ return this.update( { _id : obj._id } , obj , true );
}
}