cesardeazevedo / sails-hook-sequelize-blueprints

Sails blueprints for sequelize ORM
MIT License
32 stars 19 forks source link

Model Hooks #19

Open danofsteele opened 8 years ago

danofsteele commented 8 years ago

Hi, thanks for the hook. I'm running 0.3.0. We're trying to run Sails as a proof of concept, with Sequelize as the ORM.

I'm not currently seeing any of the hooks after step 3 of the order of operations firing. I'm trying to hook into the afterUpdate event. Is this expected?

cesardeazevedo commented 8 years ago

That's weird, i've tried to work without this sails-hook with express-sequelize example, and it seems afterUpdate and afterDestroy is not working properly, but afterCreate and beforeCreate works, and also works with this hook, seems a sequelize issue? or i might missed something?

Do you know how the afterUpdate and afterDestroy works? I stuck at it. https://gist.github.com/cesardeazevedo/62d87a60c5004ff24936adb007852e58

danofsteele commented 8 years ago

I've not had too much time to investigate, but it would appear to be a problem with a dependency, rather than you hook?