I have an existing user object in the database.
I've modified my models/user.js to add an attribute "isAdmin" to the User schema.
, isAdmin : { type: Boolean, default: false }
But now when I save the document (ie: I update my profile). The isAdmin attribute shows up when I console.log(user) in my app...(it is false as expected)...but when I goto the mongo db console directly, it is not present in the existing document.
If I create a new user object, the isAdmin attribute IS present in the new doc. How can I add this attribute to an existing document so that it shows up in the db directly?
edit: i've decided to add a role attribute and just modify the particular user setting their role to admin in robomongo instead of using mongoose to do it.