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 e249d58a
authored
Aug 29, 2013
by
Lemon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed commented lines
1 parent
62e1d673
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
2 deletions
lib/associations/has-many-double-linked.js
lib/associations/has-many-double-linked.js
View file @
e249d58
...
@@ -66,14 +66,12 @@ module.exports = (function() {
...
@@ -66,14 +66,12 @@ module.exports = (function() {
// Return only those old associations that are not found in new
// Return only those old associations that are not found in new
return
!
Utils
.
_
.
find
(
newAssociations
,
function
(
obj
)
{
return
!
Utils
.
_
.
find
(
newAssociations
,
function
(
obj
)
{
return
((
targetKeys
.
length
===
1
)
?
obj
[
targetKeys
[
0
]]
===
old
[
targetKeys
[
0
]]
:
obj
.
id
===
old
.
id
)
return
((
targetKeys
.
length
===
1
)
?
obj
[
targetKeys
[
0
]]
===
old
[
targetKeys
[
0
]]
:
obj
.
id
===
old
.
id
)
//return (!!obj[foreignIdentifier] && !!old[foreignIdentifier] ? obj[foreignIdentifier] === old[foreignIdentifier] : obj.id === old.id)
})
})
})
})
var
unassociatedObjects
=
newAssociations
.
filter
(
function
(
obj
)
{
var
unassociatedObjects
=
newAssociations
.
filter
(
function
(
obj
)
{
return
!
Utils
.
_
.
find
(
oldAssociations
,
function
(
old
)
{
return
!
Utils
.
_
.
find
(
oldAssociations
,
function
(
old
)
{
return
((
targetKeys
.
length
===
1
)
?
obj
[
targetKeys
[
0
]]
===
old
[
targetKeys
[
0
]]
:
obj
.
id
===
old
.
id
)
return
((
targetKeys
.
length
===
1
)
?
obj
[
targetKeys
[
0
]]
===
old
[
targetKeys
[
0
]]
:
obj
.
id
===
old
.
id
)
//return (!!obj[foreignIdentifier] && !!old[foreignIdentifier] ? obj[foreignIdentifier] === old[foreignIdentifier] : obj.id === old.id)
})
})
})
})
...
...
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