-
Type: Bug
-
Resolution: Done
-
Priority: Minor - P4
-
None
-
Affects Version/s: 2.6.0
-
Component/s: JavaScript, Shell
-
Server Security
-
ALL
When you run something like this it fails to deserialize the WriteResult on the client (shell):
> db.eval(function(){return db.nothing.update({fake:1},{$set:{a:1}})}) 2014-04-21T08:56:42.415-0400 ReferenceError: writeConcern is not defined > var res = db.eval(function(){return db.nothing.update({fake:1},{$set:{a:1}})}) >s res.nInserted 0 > res.tojson() 2014-04-21T08:58:49.077-0400 ReferenceError: singleBatchType is not defined // converting to json from WriteResult works much better. > db.eval(function(){return db.nothing.update({fake:1},{$set:{a:1}}).tojson()}) { "nMatched" : 0, "nUpserted" : 0, "nModified" : 0 }
This is probably due to the fact that most of the types are defined in an enclosure and not public, but more investigation should be done.