Skip to content

Commit 6cb732a

Browse files
committed
Fixed triggers with duplicated names
1 parent 988752a commit 6cb732a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/server/cypher/relationships.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export const generateRelationship = (relationship: Rel, includeTriggerBack = tru
1616
/* If both entities are the same then it's a self-relationship and we
1717
* don't need to generate verifications for both sides of the relationship. */
1818
if (relationship.entities[0].id !== relationship.entities[1].id) {
19-
statement += generateTrigger(relationship.id + " " + relationship.entities[0].id,
19+
statement += generateTrigger(relationship.id + " " + relationship.entities[1].id + " " + relationship.entities[0].id,
2020
`MATCH (n)-[r:${normalize(relationship.id)}]-(:${normalize(relationship.entities[1].id)}) WHERE NOT "${relationship.entities[0].id}" IN LABELS(n) DELETE r`
2121
)
2222
}

0 commit comments

Comments
 (0)