Skip to content
This repository

pre middleware #7

Open
tblobaum opened this Issue March 22, 2013 · 2 comments

3 participants

Thomas Blobaum saatchiCEO Eric Time
Thomas Blobaum
new ExtendedModel().save()
// pre save middleware placed on ExtendedModel.schema executes

ExtendedModel.findOne(function (e, doc) {

  console.log(doc instanceof ExtendedModel)
  // => true

  doc.save()
  // pre save middleware placed on ExtendedModel.schema does NOT execute
  // only the inherited schema's middleware works

})

saatchiCEO

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

Eric Time

hava the same issue

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.