Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
public
/
sequelize
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
不要怂,就是干,撸起袖子干!
Commit 2b319304
authored
Nov 25, 2017
by
musicformellons
Committed by
Sushant
Nov 25, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
docs(associations): incorrect model name used in hasMany (#8686)
1 parent
78fb5c15
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
docs/associations.md
docs/associations.md
View file @
2b31930
...
@@ -179,7 +179,7 @@ When information about association is present in **target** model we can use `ha
...
@@ -179,7 +179,7 @@ When information about association is present in **target** model we can use `ha
Coach
.
hasOne
(
Team
)
// `coachId` will be added on Team / Target model
Coach
.
hasOne
(
Team
)
// `coachId` will be added on Team / Target model
```
```
## One-To-Many associations
## One-To-Many associations
(hasMany)
One-To-Many associations are connecting one source with multiple targets. The targets however are again connected to exactly one specific source.
One-To-Many associations are connecting one source with multiple targets. The targets however are again connected to exactly one specific source.
```
js
```
js
...
@@ -704,7 +704,7 @@ const Series = sequelize.define('series', {
...
@@ -704,7 +704,7 @@ const Series = sequelize.define('series', {
trainer_id: {
trainer_id: {
type: DataTypes.INTEGER,
type: DataTypes.INTEGER,
references: {
references: {
model: "trainer
s
",
model: "trainer",
key: "id"
key: "id"
}
}
}
}
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment