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 73f08f8f
authored
Mar 28, 2014
by
Mick Hansen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix test
1 parent
7c4611d0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
2 deletions
lib/dao.js
lib/dialects/abstract/query.js
test/include.test.js
lib/dao.js
View file @
73f08f8
...
...
@@ -169,7 +169,7 @@ module.exports = (function() {
}
else
{
// Check if we have included models, and if this key matches the include model names/aliases
if
(
this
.
options
&&
this
.
options
.
include
&&
this
.
options
.
includeNames
.
indexOf
(
key
)
!==
-
1
)
{
if
(
this
.
options
&&
this
.
options
.
include
&&
this
.
options
.
includeNames
.
indexOf
(
key
)
!==
-
1
&&
value
)
{
// Pass it on to the include handler
this
.
_setInclude
(
key
,
value
,
options
)
return
...
...
lib/dialects/abstract/query.js
View file @
73f08f8
...
...
@@ -413,6 +413,7 @@ module.exports = (function() {
if
(
!
options
.
checkExisting
)
{
parseChildren
(
existingResult
)
}
})
// parseChildren after row parsing if duplicate values are possible
...
...
test/include.test.js
View file @
73f08f8
...
...
@@ -40,7 +40,7 @@ describe(Support.getTestDialectTeaser("Include"), function () {
it
(
'should not throw an error when an empty include is named the same as the foreign key'
,
function
(
done
)
{
var
section
=
this
.
sequelize
.
define
(
'section'
,
{
name
:
DataTypes
.
STRING
});
var
layout
=
this
.
sequelize
.
define
(
'layout'
,
{
name
:
DataTypes
.
STRING
});
section
.
belongsTo
(
layout
,
{
as
:
layout
.
name
,
foreignKey
:
layout
.
name
,
...
...
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