I'm using neo4j community edition 3.0.6 and apoc 3.0.8.6. I'm having this issues where i tried to copy a node that already have multiple relationship. Then when I use call apoc.refactor.cloneNodesWithRelationships([node1,node2,…]) the nodes and its relationship are copied. But the relationship direction is wrong. Attached the image below. As You can see in the image the relationship direction between A-B is wrong. Like it seems all the relationship created there is considered as outgoing relationship. Is this a bug on apoc 3.0.8.6 or is there any solution regarding this issue ?
Asked
Active
Viewed 90 times
2 Answers
1
An update about this issue. Sorry but just found out it was my query fault. I did use a query like this.
MATCH (p:A)-[r1:A_has_B]->(l:B)
WHERE p.id IN {0} WITH COLLECT(l) as oldBList
CALL apoc.refactor.cloneNodesWithRelationships(oldBList) YIELD output
CALL apoc.create.uuid() YIELD uuid SET output.id = uuid
WITH COLLECT(output.id) as copiedIds
MATCH (l2:B)-[r1]-()
WHERE l2.id IN copiedIdsAND r1.id IS NOT NULL
CALL apoc.create.uuid() YIELD uuid
SET r1.id = uuid
WITH copiedIds as copiedIds
UNWIND(copiedIds) as result
RETURN result
Apparently I have a case where there isn't any relationship with B that have r.id therefore the copiedIds somehow not returned to the result query. Making it seems like transactional problem.
Thanks for all the helps

Iwan Ivanto
- 35
- 6
0
I see that you created APOC issue #936 for this, which appears to be a duplicate of issue #229.
I have added a comment to issue #229 with my analysis of the APOC bug.

cybersam
- 63,203
- 6
- 53
- 76
-
Hi, I just saw the issue that You referenced. It seems the problem is different. My problem is the direction is wrong. Meanwhile the issue #229 problem is the relationship not copied correctly. – Iwan Ivanto Oct 04 '18 at 04:23
-
There are new relationships going in the wrong direction in both issues. There is a very strong possibility they are caused by the same bug. – cybersam Oct 04 '18 at 04:35
-
Hmm so currently its still not fixed yet ? Or is there any other solution ? Right now I'm inverting the wrongly created relationship direction manually. – Iwan Ivanto Oct 04 '18 at 09:14