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

Commit 91416e3b by Wojtek Committed by GitHub

docs(assocs): fix typos in assocs manual (#11888)

1 parent baf7fab3
Showing with 2 additions and 2 deletions
...@@ -73,7 +73,7 @@ In principle, both options are a valid way to establish a One-To-One relationshi ...@@ -73,7 +73,7 @@ In principle, both options are a valid way to establish a One-To-One relationshi
### Goal ### Goal
For the rest of this example, let's assume that we have two models, `Foo` and `Bar`. We want to setup a One-To-One relationship between them such that `Foo` gets a `barId` column. For the rest of this example, let's assume that we have two models, `Foo` and `Bar`. We want to setup a One-To-One relationship between them such that `Bar` gets a `fooId` column.
### Implementation ### Implementation
...@@ -84,7 +84,7 @@ Foo.hasOne(Bar); ...@@ -84,7 +84,7 @@ Foo.hasOne(Bar);
Bar.belongsTo(Foo); Bar.belongsTo(Foo);
``` ```
Since no option was passed, Sequelize will infer what to do from the names of the models. In this case, Sequelize knows that a `barId` column must be added to `Foo`. Since no option was passed, Sequelize will infer what to do from the names of the models. In this case, Sequelize knows that a `fooId` column must be added to `Bar`.
This way, calling `Bar.sync()` after the above will yield the following SQL (on PostgreSQL, for example): This way, calling `Bar.sync()` after the above will yield the following SQL (on PostgreSQL, for example):
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!