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 c861485b
authored
Mar 05, 2016
by
Sushant
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed issue with subQuery generation flag
1 parent
fc78f31b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
6 deletions
lib/model.js
test/integration/model.test.js
test/unit/sql/join-include-query.test.js
lib/model.js
View file @
c861485
...
...
@@ -486,6 +486,7 @@ var validateIncludedElements = function(options, tableNames) {
include
.
subQuery
=
false
;
}
else
{
include
.
subQueryFilter
=
false
;
include
.
subQuery
=
include
.
subQuery
||
(
include
.
hasParentRequired
&&
include
.
hasRequired
);
}
}
...
...
test/integration/model.test.js
View file @
c861485
...
...
@@ -2081,9 +2081,7 @@ describe(Support.getTestDialectTeaser('Model'), function() {
return
this
.
UserWithFields
.
bulkCreate
([
{
age
:
2
,
gender
:
'male'
},
{
age
:
3
,
gender
:
'female'
}
],
{
logging
:
console
.
log
}).
bind
(
this
).
then
(
function
()
{
]).
bind
(
this
).
then
(
function
()
{
return
expect
(
this
.
UserWithFields
.
sum
(
'age'
,
{
where
:
{
'gender'
:
'male'
}
})).
to
.
eventually
.
equal
(
2
);
...
...
test/unit/sql/join-include-query.test.js
View file @
c861485
...
...
@@ -11,7 +11,7 @@ var Support = require(__dirname + '/../support')
// Notice: [] will be replaced by dialect specific tick/quote character when there is not dialect specific expectation but only a default expectation
suite
(
Support
.
getTestDialectTeaser
(
'SQL'
),
function
()
{
suite
(
Support
.
getTestDialectTeaser
(
'SQL'
),
function
()
{
suite
(
'joinIncludeQuery'
,
function
()
{
var
testsql
=
function
(
params
,
options
,
expectation
)
{
if
(
expectation
===
undefined
)
{
...
...
@@ -294,4 +294,4 @@ suite(Support.getTestDialectTeaser('SQL'), function() {
default
:
"LEFT OUTER JOIN [task] AS [Tasks] ON [Tasks].[user_id] = [User].[alternative_id]"
});
});
});
\ No newline at end of file
});
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