Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

delete a relationship removes all LINKS of the entitySource #8

Closed
EliuX opened this issue Nov 27, 2019 · 1 comment
Closed

delete a relationship removes all LINKS of the entitySource #8

EliuX opened this issue Nov 27, 2019 · 1 comment

Comments

@EliuX
Copy link

EliuX commented Nov 27, 2019

Describe the bug
If you have a node A with multiple relationships of type X with B, C, and D having him as the source entity, if you execute

CALL graph.versioner.relationship.delete(A, B, 'X')

the new current State of A will have not have any relationship of type X coming out of it.

To Reproduce
Steps to reproduce the behavior:

  1. Create multiple entities
CALL graph.versioner.init('Entity', {name: 'Entity1'}, {address: 'Via Roma 11'}) YIELD node RETURN node
CALL graph.versioner.init('Entity', {name: 'Entity2'}, {address: 'Via Roma 12'}) YIELD node RETURN node
CALL graph.versioner.init('Entity', {name: 'Entity3'}, {address: 'Via Roma 13'}) YIELD node RETURN node
  1. Then create a relationship between Entity1 and the rest of the entities
MATCH (e1:Entity {name:'Entity1'}), (e2:Entity {name:'Entity2'}),(e3:Entity {name:'Entity3'}) WITH e1, e2, e3 
CALL graph.versioner.relationship.create(e1, e2, 'REL') YIELD relationship AS rel12
CALL graph.versioner.relationship.create(e1, e3, 'REL') YIELD relationship AS rel13
RETURN rel12, rel13

After running this the graph shall look like this

image

  1. Lets now remove the relationship between the entity1 and entity2
MATCH (e1:Entity {name:'Entity1'}), (e2:Entity {name:'Entity2'})
CALL graph.versioner.relationship.delete(e1, e2, 'REL') YIELD result
RETURN result

After this we expect the relationship between e1 and e3 to remain, but it disappears
image

Expected behavior
It was expected that when I used graph.versioner.relationship.delete(e1, e2, 'REL') only the relationship of type REL between the specified nodes was the only one deleted.

Desktop (please complete the following information):

  • OS: MacOS Mohave Version 10.14.5 (18F132)
  • Browser Google Chrome Version 78.0.3904.108 (Official Build) (64-bit)

Additional context
Add any other context about the problem here.

tschn pushed a commit to tschn/neo4j-versioner-core that referenced this issue Apr 22, 2020
mfalcier added a commit that referenced this issue Mar 10, 2021
🐛 fix for #8 + new relationship procedures
@mfalcier
Copy link
Member

Solved with release of version 2.0.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants