不要怂,就是干,撸起袖子干!

Commit 945e0288 by Mick Hansen

Merge pull request #3206 from mbroadst/hooks-cleanup

refactor Hooks mixin
2 parents f2fa9eb4 63e80554
......@@ -2179,7 +2179,7 @@ module.exports = (function() {
};
Utils._.extend(Model.prototype, associationsMixin);
Utils._.extend(Model.prototype, Hooks);
Hooks.applyTo(Model);
return Model;
})();
......@@ -268,8 +268,7 @@ module.exports = (function() {
* Allow hooks to be defined on Sequelize + on sequelize instance as universal hooks to run on all models
* and on Sequelize/sequelize methods e.g. Sequelize(), Sequelize#define()
*/
Utils._.extend(Sequelize, Hooks);
Utils._.extend(Sequelize.prototype, Hooks);
Hooks.applyTo(Sequelize);
/**
* A general error class
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!