Re: [nodejs] MongoDB / Mongoose - prevent field update

2013-02-25 Thread smak
Dan, Thanks for the information... I will knock around and see what I can do with that approach. Thanks, smak On Friday, February 22, 2013 10:01:45 AM UTC-5, Dan Milon wrote: > > It's up to you to filter and validate the input. (ok, mongoose has > some basic validation but that won't help you

Re: [nodejs] MongoDB / Mongoose - prevent field update

2013-02-22 Thread Dan Milon
It's up to you to filter and validate the input. (ok, mongoose has some basic validation but that won't help you here). here's what I do. Hope that helps: ```javascript // User.UPDATE_ATTRS is an array of the permitted attributes // for updating. // // filter returns an object with only those key

[nodejs] MongoDB / Mongoose - prevent field update

2013-02-22 Thread smak
Note: I am new to the Node stack and am still in the learning stages. Setup: Node / Express / Mongoose / MongoDB for a web application. Issue: How does one prevent the updating of a field in a document. i.e. createdAt or userName. In theory, some values should be created and then be read