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

Commit 2cb214b6 by Mick Hansen

Merge pull request #3004 from Dahlgren/docs-associations-typo

docs(associations): missing curly brackets in Belongs-To-Many
2 parents f980f1e2 14b6dba2
Showing with 2 additions and 2 deletions
......@@ -88,8 +88,8 @@ But we want more! Let's define it the other way around by creating a many to man
Belongs-To-Many associations are used to connect sources with multiple targets. Furthermore the targets can also have connections to multiple sources.
```js
Project.belongsToMany(User, {through: 'UserProject');
User.belongsToMany(Project, {through: 'UserProject');
Project.belongsToMany(User, {through: 'UserProject'});
User.belongsToMany(Project, {through: 'UserProject'});
```
This will reate 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).
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!