-
Notifications
You must be signed in to change notification settings - Fork 0
Broken with Mongoose 4.0.3 #1
Comments
I would also be grateful if this could be ported to Mongoose 4.x. |
Any update on this? |
Sorry I've stopped using this plugin in production and I haven't had much time to maintain it. I'd be happy to accept any pull requests though! If I do get a chance I'll look into it |
:-( do you have any idea of where to find another plugin that works with current version and provides this functionality? |
Sorry I'm not aware of any other plugins for the new versions, if anyone has suggestions I would be happy to link to it in the readme though |
Something like this might work (not exactly a hook but maybe it'll work for you): function constructPlugin(schema) {
schema.methods.$constructHookPluginFn = function () {
this.emit('construct');
}
schema.queue('$constructHookPluginFn', []);
}
myschema.plugin(constructPlugin);
myschema.post('construct', myHookHandler); The hook system has changed since the last version this worked with and I'm not sure what the best route to go is. Here we are just adding a method to the model that is called with the I'll try to test this out when I get a chance |
Hi,
This seems to be broken with the release of Mongoose 4.x. Could you possibly update it so that we who depend on you can move to the new releases?
Thanks!
The text was updated successfully, but these errors were encountered: