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 97f840e3
authored
Feb 23, 2014
by
Mick Hansen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix performance regression
1 parent
56fdc84c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
lib/dao-factory.js
lib/dao.js
lib/dao-factory.js
View file @
97f840e
...
@@ -294,6 +294,9 @@ module.exports = (function() {
...
@@ -294,6 +294,9 @@ module.exports = (function() {
Object
.
defineProperties
(
this
.
DAO
.
prototype
,
attributeManipulation
)
Object
.
defineProperties
(
this
.
DAO
.
prototype
,
attributeManipulation
)
this
.
DAO
.
prototype
.
attributes
=
Object
.
keys
(
this
.
DAO
.
prototype
.
rawAttributes
)
this
.
DAO
.
prototype
.
attributes
=
Object
.
keys
(
this
.
DAO
.
prototype
.
rawAttributes
)
this
.
DAO
.
prototype
.
_isAttribute
=
Utils
.
_
.
memoize
(
function
(
key
)
{
return
self
.
DAO
.
prototype
.
attributes
.
indexOf
(
key
)
!==
-
1
})
}
}
DAOFactory
.
prototype
.
sync
=
function
(
options
)
{
DAOFactory
.
prototype
.
sync
=
function
(
options
)
{
...
...
lib/dao.js
View file @
97f840e
...
@@ -162,8 +162,8 @@ module.exports = (function() {
...
@@ -162,8 +162,8 @@ module.exports = (function() {
this
.
_setInclude
(
key
,
value
,
options
)
this
.
_setInclude
(
key
,
value
,
options
)
return
return
}
else
{
}
else
{
// If not raw, and attribute is not in model definition
// If not raw, and attribute is not in model definition
, return
if
(
!
options
.
raw
&&
Object
.
keys
(
this
.
Model
.
attributes
).
indexOf
(
key
)
===
-
1
)
{
if
(
!
options
.
raw
&&
!
this
.
_isAttribute
(
key
)
)
{
return
;
return
;
}
}
...
...
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