post1, post2, post3 are all Posts related to a user tom, tom.posts.to_a returns me array of posts [post1, post2, post3].
Now if I do tom.posts = [post1, post2, post3], it deletes all existing relationships between tom and 'post1, post2, post3' and creates same new relations for tom with same posts post1, post2, post3.
Expected behaviour would be to not delete existing relations and create same ones. We should delete or create only delta.
Additional information which could be helpful if relevant to your issue:
post1, post2, post3
are allPost
s related to a usertom
,tom.posts.to_a
returns me array of posts[post1, post2, post3]
. Now if I dotom.posts = [post1, post2, post3]
, it deletes all existing relationships betweentom
and 'post1, post2, post3' and creates same new relations fortom
with same postspost1, post2, post3
.Expected behaviour would be to not delete existing relations and create same ones. We should delete or create only delta.
Additional information which could be helpful if relevant to your issue:
Code example (inline, gist, or repo)
Runtime information:
Neo4j database version:
neo4j
gem version:neo4j-core
gem version: