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

Commit 07e2ac06 by Horcrux

fix document for associations

fix document for associations
1 parent 940f8fb6
Showing with 1 additions and 1 deletions
...@@ -150,7 +150,7 @@ Project.belongsToMany(User, {through: 'UserProject'}); ...@@ -150,7 +150,7 @@ Project.belongsToMany(User, {through: 'UserProject'});
User.belongsToMany(Project, {through: 'UserProject'}); User.belongsToMany(Project, {through: 'UserProject'});
``` ```
This will create a new model called UserProject with with the equivalent foreign keys `ProjectId` and `UserId`. Whether the attributes are camelcase or not depends on the two models joined by the table (in this case User and Project). This will create a new model called UserProject with the equivalent foreign keys `ProjectId` and `UserId`. Whether the attributes are camelcase or not depends on the two models joined by the table (in this case User and Project).
Defining `through` is required. Sequelize would previously attempt to autogenerate names but that would not always lead to the most logical setups. Defining `through` is required. Sequelize would previously attempt to autogenerate names but that would not always lead to the most logical setups.
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!