Within my MongoDB v2.2 NodeJS 0.8 MongoSkin 0.5 Framework setup, I have implemented the following code:
var db = mongo.db(admin+"@127.0.0.1:27017/database",{safe:true});
db.collection('collection').findAndModify({'code':code,'email':email},[],
{
$push:
{
'code.pub':newPub,
}
},{new:true},
function(err, result)
After using the new true option, I noticed that it returns the old value in MongoDB. Can anyone explain why this is happening and what might be wrong?