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 4952dca4
authored
Dec 13, 2011
by
sdepold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dont modify attributes but rawAttributes
1 parent
1abe41ba
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
lib/associations/belongs-to.js
lib/associations/has-many.js
lib/associations/has-one.js
lib/associations/belongs-to.js
View file @
4952dca
...
@@ -22,7 +22,7 @@ module.exports = (function() {
...
@@ -22,7 +22,7 @@ module.exports = (function() {
this
.
identifier
=
this
.
options
.
foreignKey
||
Utils
.
_
.
underscoredIf
(
Utils
.
singularize
(
this
.
target
.
tableName
)
+
"Id"
,
this
.
source
.
options
.
underscored
)
this
.
identifier
=
this
.
options
.
foreignKey
||
Utils
.
_
.
underscoredIf
(
Utils
.
singularize
(
this
.
target
.
tableName
)
+
"Id"
,
this
.
source
.
options
.
underscored
)
newAttributes
[
this
.
identifier
]
=
{
type
:
DataTypes
.
INTEGER
}
newAttributes
[
this
.
identifier
]
=
{
type
:
DataTypes
.
INTEGER
}
Utils
.
_
.
extend
(
this
.
source
.
attributes
,
this
.
source
.
QueryGenerator
.
attributesToSQL
(
newAttributes
)
)
Utils
.
_
.
extend
(
this
.
source
.
rawAttributes
,
newAttributes
)
return
this
return
this
}
}
...
...
lib/associations/has-many.js
View file @
4952dca
...
@@ -55,7 +55,7 @@ module.exports = (function() {
...
@@ -55,7 +55,7 @@ module.exports = (function() {
}
else
{
}
else
{
var
newAttributes
=
{}
var
newAttributes
=
{}
newAttributes
[
this
.
identifier
]
=
{
type
:
DataTypes
.
INTEGER
}
newAttributes
[
this
.
identifier
]
=
{
type
:
DataTypes
.
INTEGER
}
Utils
.
_
.
extend
(
this
.
target
.
attributes
,
this
.
source
.
QueryGenerator
.
attributesToSQL
(
newAttributes
)
)
Utils
.
_
.
extend
(
this
.
target
.
rawAttributes
,
newAttributes
)
}
}
return
this
return
this
...
...
lib/associations/has-one.js
View file @
4952dca
...
@@ -27,7 +27,7 @@ module.exports = (function() {
...
@@ -27,7 +27,7 @@ module.exports = (function() {
this
.
identifier
=
this
.
options
.
foreignKey
||
Utils
.
_
.
underscoredIf
(
Utils
.
singularize
(
this
.
source
.
tableName
)
+
"Id"
,
this
.
options
.
underscored
)
this
.
identifier
=
this
.
options
.
foreignKey
||
Utils
.
_
.
underscoredIf
(
Utils
.
singularize
(
this
.
source
.
tableName
)
+
"Id"
,
this
.
options
.
underscored
)
newAttributes
[
this
.
identifier
]
=
{
type
:
DataTypes
.
INTEGER
}
newAttributes
[
this
.
identifier
]
=
{
type
:
DataTypes
.
INTEGER
}
Utils
.
_
.
extend
(
this
.
target
.
attributes
,
this
.
source
.
QueryGenerator
.
attributesToSQL
(
newAttributes
)
)
Utils
.
_
.
extend
(
this
.
target
.
rawAttributes
,
newAttributes
)
return
this
return
this
}
}
...
...
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