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 9b22f127
authored
Feb 02, 2014
by
Mick Hansen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't check for existing results if no multi associations are included
1 parent
df42db65
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
lib/dialects/abstract/query.js
lib/query-interface.js
lib/dialects/abstract/query.js
View file @
9b22f12
...
@@ -343,7 +343,7 @@ module.exports = (function() {
...
@@ -343,7 +343,7 @@ module.exports = (function() {
row
=
Dot
.
transform
(
row
)
row
=
Dot
.
transform
(
row
)
calleeData
=
_
.
omit
(
row
,
calleeDataIgnore
)
calleeData
=
_
.
omit
(
row
,
calleeDataIgnore
)
existingResult
=
_
.
find
(
results
,
function
(
result
)
{
existingResult
=
options
.
hasMultiAssociation
&&
_
.
find
(
results
,
function
(
result
)
{
if
(
calleeDataIgnore
)
{
if
(
calleeDataIgnore
)
{
return
Utils
.
_
.
isEqual
(
_
.
omit
(
result
,
calleeDataIgnore
),
calleeData
)
return
Utils
.
_
.
isEqual
(
_
.
omit
(
result
,
calleeDataIgnore
),
calleeData
)
}
}
...
...
lib/query-interface.js
View file @
9b22f12
...
@@ -711,7 +711,13 @@ module.exports = (function() {
...
@@ -711,7 +711,13 @@ module.exports = (function() {
}
}
var
sql
=
this
.
QueryGenerator
.
selectQuery
(
tableName
,
options
,
factory
)
var
sql
=
this
.
QueryGenerator
.
selectQuery
(
tableName
,
options
,
factory
)
queryOptions
=
Utils
.
_
.
extend
({},
queryOptions
,
{
include
:
options
.
include
,
includeNames
:
options
.
includeNames
,
includeMap
:
options
.
includeMap
})
queryOptions
=
Utils
.
_
.
extend
({},
queryOptions
,
{
include
:
options
.
include
,
includeNames
:
options
.
includeNames
,
includeMap
:
options
.
includeMap
,
hasSingleAssociation
:
options
.
hasSingleAssociation
,
hasMultiAssociation
:
options
.
hasMultiAssociation
})
return
queryAndEmit
.
call
(
this
,
[
sql
,
factory
,
queryOptions
],
'select'
)
return
queryAndEmit
.
call
(
this
,
[
sql
,
factory
,
queryOptions
],
'select'
)
}
}
...
...
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