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 97e063d2
authored
Jun 19, 2013
by
Jochem Maas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change use of doa.value property to using doa.dataValues
1 parent
2eb96be5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
lib/dao-factory.js
lib/dao.js
lib/dao-factory.js
View file @
97e063d
...
...
@@ -396,7 +396,7 @@ module.exports = (function() {
daos
.
forEach
(
function
(
dao
)
{
var
values
=
{};
fields
.
forEach
(
function
(
field
)
{
values
[
field
]
=
dao
.
v
alues
[
field
]
values
[
field
]
=
dao
.
dataV
alues
[
field
]
})
if
(
self
.
options
.
timestamps
)
{
values
[
updatedAtAttr
]
=
Utils
.
now
()
...
...
@@ -406,7 +406,7 @@ module.exports = (function() {
}
else
{
daos
.
forEach
(
function
(
dao
)
{
records
.
push
(
dao
.
v
alues
)
records
.
push
(
dao
.
dataV
alues
)
})
}
...
...
lib/dao.js
View file @
97e063d
...
...
@@ -93,7 +93,7 @@ module.exports = (function() {
// only those fields will be updated
DAO
.
prototype
.
save
=
function
(
fields
)
{
var
self
=
this
,
values
=
fields
?
{}
:
this
.
v
alues
,
values
=
fields
?
{}
:
this
.
dataV
alues
,
updatedAtAttr
=
this
.
__options
.
underscored
?
'updated_at'
:
'updatedAt'
,
createdAtAttr
=
this
.
__options
.
underscored
?
'created_at'
:
'createdAt'
...
...
@@ -108,7 +108,7 @@ module.exports = (function() {
}
}
var
tmpVals
=
self
.
v
alues
var
tmpVals
=
self
.
dataV
alues
fields
.
forEach
(
function
(
field
)
{
if
(
tmpVals
[
field
]
!==
undefined
)
{
...
...
@@ -279,7 +279,7 @@ module.exports = (function() {
DAO
.
prototype
.
equals
=
function
(
other
)
{
var
result
=
true
Utils
.
_
.
each
(
this
.
v
alues
,
function
(
value
,
key
)
{
Utils
.
_
.
each
(
this
.
dataV
alues
,
function
(
value
,
key
)
{
if
(
Utils
.
_
.
isDate
(
value
)
&&
Utils
.
_
.
isDate
(
other
[
key
]))
{
result
=
result
&&
(
value
.
getTime
()
==
other
[
key
].
getTime
())
}
else
{
...
...
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