When attempting to modify an existing document in a MongoDb collection, an exception is generated with the following message:
javascript execution failed : can't save a DBQuery object at src/mongo/shell/collection.js
The following actions are performed in the mongoDb shell:
> var doc1 = db.users.find({name:"Harmeet"})
> doc1.color = "Blue"
> db.users.save(doc1)
However, when the save method is called, the exception is thrown.