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

Commit 36f5ac07 by Mick Hansen

Merge pull request #5018 from kirla3092/patch-2

Docs: typo in hooks.md
2 parents 95fa0fc3 bef6d271
Showing with 1 additions and 1 deletions
...@@ -258,7 +258,7 @@ Tasks.belongsTo(Projects) ...@@ -258,7 +258,7 @@ Tasks.belongsTo(Projects)
This code will run beforeDestroy/afterDestroy on the Tasks table. Sequelize, by default, will try to optimize your queries as much as possible. When calling cascade on delete, Sequelize will simply execute a This code will run beforeDestroy/afterDestroy on the Tasks table. Sequelize, by default, will try to optimize your queries as much as possible. When calling cascade on delete, Sequelize will simply execute a
```sql ```sql
DELETE FROM `table` WHERE associatedIdentifiier = associatedIdentifier.primaryKey DELETE FROM `table` WHERE associatedIdentifier = associatedIdentifier.primaryKey
``` ```
However, adding `hooks: true` explicitly tells Sequelize that optimization is not of your concern and will perform a `SELECT` on the associated objects and destroy each instance one by one in order to be able to call the hooks with the right parameters. However, adding `hooks: true` explicitly tells Sequelize that optimization is not of your concern and will perform a `SELECT` on the associated objects and destroy each instance one by one in order to be able to call the hooks with the right parameters.
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!