Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Replace existing document #1941

scriby opened this Issue · 3 comments

4 participants


I've been looking for a way to take a model instance and completely overwrite an existing entry in Mongo with it. I'd like validation and other middleware to run on the instance being saved.

The overwrite functionality added in 3.8 looks close to what I want, but it appears that it doesn't run validation and middleware.


Yes, I am also looking for the exact same feature. My schema have mixed sub documents and when I try to save, it only updates the changes but doesn't delete the others. In some cases, I want them to be deleted.


+1 I miss it badly too.


4.0 does have middleware and ability to run validators on update(). What exactly are you trying to achieve?

@vkarpov15 vkarpov15 closed this
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.