diff options
Diffstat (limited to 'shell/collection.js')
-rw-r--r-- | shell/collection.js | 6 |
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 ); } } |