Skip to content

Commit

Permalink
🎉 🐛 fix for h-omer#8
Browse files Browse the repository at this point in the history
  • Loading branch information
tschoen committed Apr 22, 2020
1 parent 74eea36 commit 49dc5ed
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,4 @@ We would appreciate your feedback about our Versioner Core, how to improve and f

## Buy us a coffee :coffee:

This project is developed during our free time, and our free time is mostly during evening/night! So coffee is really helpful during our sessions :sweat_smile:. If you want to help us with that, you can buy us some :coffee: thanks to [PayPal](https://www.paypal.me/mfalcier/2)!

test
This project is developed during our free time, and our free time is mostly during evening/night! So coffee is really helpful during our sessions :sweat_smile:. If you want to help us with that, you can buy us some :coffee: thanks to [PayPal](https://www.paypal.me/mfalcier/2)!
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,13 @@ public Stream<BooleanOutput> relationshipDelete(
Update updateProcedure = new UpdateBuilder().withLog(log).withDb(db).build().orElseThrow(() -> new VersionerCoreException("Unable to initialize update procedure"));

if (sourceCurrentState.isPresent() && destinationRNode.isPresent()) {
final long destId = destinationRNode.get().getId();
updateProcedure.update(entitySource, sourceCurrentState.get().getAllProperties(), "", null);
getCurrentRelationship(entitySource).ifPresent(rel -> rel.getEndNode().getRelationships(RelationshipType.withName(type), Direction.OUTGOING).forEach(Relationship::delete));
getCurrentRelationship(entitySource).ifPresent(rel -> rel.getEndNode().getRelationships(RelationshipType.withName(type), Direction.OUTGOING).forEach(rel2 -> {
if (rel2.getEndNode().getId() == destId) {
rel2.delete();
}
}));
return Stream.of(new BooleanOutput(Boolean.TRUE));
} else {
return Stream.of(new BooleanOutput(Boolean.FALSE));
Expand Down

0 comments on commit 49dc5ed

Please sign in to comment.