make model.update default application optional #472

aheckmann opened this Issue Aug 25, 2011 · 5 comments


None yet

4 participants


right now no default values are applied. might be nice to have this option

kof commented May 10, 2012

Not only defaults, but also

  • defaults
  • setter
  • custom validations
  • enum

if upsert option is used, also

  • required
kof commented May 10, 2012

It is critical for performance in some cases, right now I have one. I need to do a lot of inserts, but sometimes there is already a document, which needs to be updated, so upsert option ideally fits this. But if using current update implementaiton all schema stuff will be ignored, so I am running in different validation/defaults issues. Currently I am doing ugly workarounds like creating a new document, calling .validate method, doing toObject call, removing _id, and then doing update with upsert:true


any news / plans?

contra commented Nov 27, 2012

Any updates on this?

@aheckmann aheckmann closed this Oct 2, 2013

closing, over two years old

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment