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 f25a59de
authored
Oct 12, 2017
by
Dan Chung
Committed by
Sushant
Oct 13, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
docs(hooks): fix typo in bulk update example. (#8470)
1 parent
0a79ef81
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
docs/hooks.md
docs/hooks.md
View file @
f25a59d
...
@@ -239,7 +239,7 @@ Model.bulkCreate([
...
@@ -239,7 +239,7 @@ Model.bulkCreate([
Model
.
beforeBulkUpdate
(({
attributes
,
where
})
=>
{
Model
.
beforeBulkUpdate
(({
attributes
,
where
})
=>
{
// where - in one of the fields of the clone of second argument sent to .update
// where - in one of the fields of the clone of second argument sent to .update
// attributes - is one of the fields that the clone of second argument of .update would be extended with
// attributes - is one of the fields that the clone of second argument of .update would be extended with
})
})
Model
.
update
({
gender
:
'Male'
}
/*attributes argument*/
,
{
where
:
{
username
:
'Tom'
}}
/*where argument*/
)
Model
.
update
({
gender
:
'Male'
}
/*attributes argument*/
,
{
where
:
{
username
:
'Tom'
}}
/*where argument*/
)
...
@@ -257,7 +257,7 @@ If you use `Model.bulkCreate(...)` with the `updatesOnDuplicate` option, changes
...
@@ -257,7 +257,7 @@ If you use `Model.bulkCreate(...)` with the `updatesOnDuplicate` option, changes
```
js
```
js
// Bulk updating existing users with updatesOnDuplicate option
// Bulk updating existing users with updatesOnDuplicate option
Users
.
bulkCreate
([
Users
.
bulkCreate
([
{
id
:
1
,
isMem
e
ber
:
true
},
{
id
:
1
,
isMember
:
true
},
{
id
:
2
,
isMember
:
false
}
{
id
:
2
,
isMember
:
false
}
],
{
],
{
updatesOnDuplicate
:
[
'isMember'
]
updatesOnDuplicate
:
[
'isMember'
]
...
...
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