Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

make model.update default application optional #472

Closed
aheckmann opened this Issue · 5 comments

4 participants

@aheckmann
Owner

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

@kof

Not only defaults, but also

  • defaults
  • setter
  • custom validations
  • enum

if upsert option is used, also

  • required
@kof

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

@hannesgassert

any news / plans?

@contra

Any updates on this?

@aheckmann aheckmann closed this
@aheckmann
Owner

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.