Skip to content


Subversion checkout URL

You can clone with
Download ZIP


make model.update default application optional #472

aheckmann opened this Issue · 5 comments

4 participants


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


Not only defaults, but also

  • defaults
  • setter
  • custom validations
  • enum

if upsert option is used, also

  • required

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?


Any updates on this?

@aheckmann aheckmann closed this

closing, over two years old

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.