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 f7f8dad6
authored
Mar 02, 2015
by
Ryan Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Corrected spelling from "rayther" to "rather"
1 parent
bd0bc00b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
1 deletions
docs/docs/associations.md
docs/docs/associations.md
View file @
f7f8dad
...
@@ -43,7 +43,7 @@ In cases wherè `as` has been defined it will be used in place of the target mod
...
@@ -43,7 +43,7 @@ In cases wherè `as` has been defined it will be used in place of the target mod
var
User
=
this
.
sequelize
.
define
(
'User'
,
{
/* attributes */
})
var
User
=
this
.
sequelize
.
define
(
'User'
,
{
/* attributes */
})
,
UserRole
=
this
.
sequelize
.
define
(
'UserRole'
,
{
/* attributes */
});
,
UserRole
=
this
.
sequelize
.
define
(
'UserRole'
,
{
/* attributes */
});
User
.
belongsTo
(
UserRole
,
{
as
:
'Role'
});
// Adds RoleId to user rat
y
er than UserRoleId
User
.
belongsTo
(
UserRole
,
{
as
:
'Role'
});
// Adds RoleId to user rat
h
er than UserRoleId
```
```
In all cases the default foreign key can be overwritten with the
`foreignKey`
option.
In all cases the default foreign key can be overwritten with the
`foreignKey`
option.
...
...
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