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 01dbaa5d
authored
Oct 04, 2015
by
Jan Aagaard Meier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor(internals) Only recurse on plain object in mapOptionFieldNames. Closes #4596
1 parent
a6a8146c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
changelog.md
lib/utils.js
changelog.md
View file @
01dbaa5
...
...
@@ -10,6 +10,7 @@
-
[
FIXED
]
Include all with scopes
[
#4584
](
https://github.com/sequelize/sequelize/issues/4584
)
-
[
INTERNALS
]
Corrected spelling seperate -> separate
-
[
ADDED
]
Added
`include`
and
`exclude`
to
`options.attributes`
.
[
#4074
](
https://github.com/sequelize/sequelize/issues/4074
)
-
[
FIXED/INTERNALS
]
Only recurse on plain objects in
`mapOptionFieldNames`
.
[
#4596
](
https://github.com/sequelize/sequelize/issues/4596
)
# 3.10.0
-
[
ADDED
]
support
`search_path`
for postgres with lots of schemas
[
#4534
](
https://github.com/sequelize/sequelize/pull/4534
)
...
...
lib/utils.js
View file @
01dbaa5
...
...
@@ -111,7 +111,7 @@ var Utils = module.exports = {
});
}
if
(
options
.
where
)
{
if
(
options
.
where
&&
_
.
isPlainObject
(
options
.
where
)
)
{
var
attributes
=
options
.
where
,
attribute
,
rawAttribute
;
...
...
@@ -132,14 +132,19 @@ var Utils = module.exports = {
if
(
Array
.
isArray
(
attributes
[
attribute
]))
{
attributes
[
attribute
]
=
attributes
[
attribute
].
map
(
function
(
where
)
{
return
Utils
.
mapOptionFieldNames
({
where
:
where
},
Model
).
where
;
if
(
_
.
isPlainObject
(
where
))
{
return
Utils
.
mapOptionFieldNames
({
where
:
where
},
Model
).
where
;
}
return
where
;
});
}
}
}
}
return
options
;
},
...
...
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