I\'m trying to update a mongodb document with mongoose in node.js
When the field exists, the update works, but if the field does not exist, the update will not work.
Try the following code:
User.update( {uid: 'uid'}, {vehicle_status : 'vehicleSatus' }, {multi:true}, function(err, numberAffected){ });
Also, make sure that you add vehicle_status to the schema.