pre middleware #7

tblobaum opened this Issue Mar 22, 2013 · 6 comments


None yet

5 participants

new ExtendedModel().save()
// pre save middleware placed on ExtendedModel.schema executes

ExtendedModel.findOne(function (e, doc) {

  console.log(doc instanceof ExtendedModel)
  // => true
  // pre save middleware placed on ExtendedModel.schema does NOT execute
  // only the inherited schema's middleware works


Uh-oh, that's very bad. Bump.


hava the same issue


Working on it:

@sieira sieira added the bug label Nov 11, 2015
@sieira sieira self-assigned this Nov 11, 2015

Well, this solves it


Unfortunately, it forces the user to include the --harmony-proxies flag.

#35 solves it as well, but not so well, and anyway O.o will soon be deprecated, I will merge the proxies approach in a couple of days if no-one has a better solution.

This was referenced Nov 11, 2015

This is solved in 2.0.1

@sieira sieira closed this Feb 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment