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 ce5c338c
authored
Jun 19, 2015
by
Jason Murad
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move "has zero" to destroy/hook check up earlier
1 parent
f0f3f75b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
lib/query-interface.js
lib/query-interface.js
View file @
ce5c338
...
@@ -648,13 +648,14 @@ QueryInterface.prototype.delete = function(instance, tableName, identifier, opti
...
@@ -648,13 +648,14 @@ QueryInterface.prototype.delete = function(instance, tableName, identifier, opti
transaction
:
options
.
transaction
,
transaction
:
options
.
transaction
,
logging
:
options
.
logging
logging
:
options
.
logging
}).
then
(
function
(
instances
)
{
}).
then
(
function
(
instances
)
{
// Check for hasOne relationship with non-existing associate ("has zero")
if
(
!
instances
)
{
return
Promise
.
resolve
();
}
if
(
!
Array
.
isArray
(
instances
))
instances
=
[
instances
];
if
(
!
Array
.
isArray
(
instances
))
instances
=
[
instances
];
return
Promise
.
each
(
instances
,
function
(
instance
)
{
return
Promise
.
each
(
instances
,
function
(
instance
)
{
if
(
!
instance
)
{
return
Promise
.
resolve
();
}
return
instance
.
destroy
({
return
instance
.
destroy
({
transaction
:
options
.
transaction
,
transaction
:
options
.
transaction
,
logging
:
options
.
logging
logging
:
options
.
logging
...
...
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