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 74f2c95d
authored
May 01, 2012
by
Nazar Aziz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
split updateAttributes into setAttributes and updateAttributes where the latter saves given updates
1 parent
38135327
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
lib/dao.js
lib/dao.js
View file @
74f2c95
...
...
@@ -164,6 +164,11 @@ module.exports = (function() {
DAO
.
prototype
.
updateAttributes
=
function
(
updates
)
{
this
.
setAttributes
(
updates
)
return
this
.
save
()
}
DAO
.
prototype
.
setAttributes
=
function
(
updates
)
{
var
self
=
this
var
readOnlyAttributes
=
Utils
.
_
.
keys
(
this
.
__factory
.
primaryKeys
)
...
...
@@ -180,8 +185,6 @@ module.exports = (function() {
)
updateAllowed
&&
(
self
[
attr
]
=
value
)
})
return
this
.
save
()
}
DAO
.
prototype
.
destroy
=
function
()
{
...
...
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