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

Commit d4a34ae5 by Luke Gumbley Committed by Sushant

docs(associations): project / tasks example cardinality (#8903)

1 parent 781d5288
Showing with 2 additions and 2 deletions
...@@ -478,8 +478,8 @@ Subscription.hasMany(Invoice, { foreignKey: 'subscription_id' ) ...@@ -478,8 +478,8 @@ Subscription.hasMany(Invoice, { foreignKey: 'subscription_id' )
Because Sequelize is doing a lot of magic, you have to call `Sequelize.sync` after setting the associations! Doing so will allow you the following: Because Sequelize is doing a lot of magic, you have to call `Sequelize.sync` after setting the associations! Doing so will allow you the following:
```js ```js
Project.belongsToMany(Task) Project.hasMany(Task)
Task.belongsToMany(Project) Task.belongsTo(Project)
   
Project.create()... Project.create()...
Task.create()... Task.create()...
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!