You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A trigger for deletedRelationship is called regardless of where or why the relationship was deleted.
Actual Behavior (Mandatory)
Trigger is not called when the relationship is deleted from inside another trigger.
How to Reproduce the Problem
Set up a two-hop path where each hop should be automatically deleted by a trigger. Only the first hop will be deleted because the second hop's trigger will never be called.
Simple Dataset (where it's possibile)
CREATE (a:Resource {name: 'foo'});
CREATE (s:Selector {name: 'sel'});
CREATE (k:KVP {key: 'foo', value: 'bar'});
CALL apoc.trigger.add('deleteOrphanedLabels',
"UNWIND {deletedRelationships} AS rel MATCH ()-[rel]->(l:KVP) CALL apoc.log.info('Called delete on %s', [l {.key, .value}]) DETACH DELETE l RETURN null",
{ phase: "before" });
CALL apoc.trigger.add('deleteOrphanedSelectors',
"UNWIND {deletedRelationships} AS rel MATCH ()-[rel]->(s:Selector) DETACH DELETE s RETURN null",
{ phase: "before" });
Comment by klongmitre Thursday Jan 13, 2022 at 18:35 GMT
I'm seeing a similar problem where a SET on a node made inside a before trigger is not triggering another trigger that should be called when the field is changed. The second trigger does fire when I manually update the field. Have you been able to figure this out at all?
Issue by kraney
Tuesday Jul 16, 2019 at 23:50 GMT
Originally opened as neo4j-contrib/neo4j-apoc-procedures#1258
Expected Behavior (Mandatory)
A trigger for deletedRelationship is called regardless of where or why the relationship was deleted.
Actual Behavior (Mandatory)
Trigger is not called when the relationship is deleted from inside another trigger.
How to Reproduce the Problem
Set up a two-hop path where each hop should be automatically deleted by a trigger. Only the first hop will be deleted because the second hop's trigger will never be called.
Simple Dataset (where it's possibile)
Steps (Mandatory)
1.MATCH (a:Resource {name: 'foo'}) DETACH DELETE a;
Specifications (Mandatory)
Currently used versions
Versions
The text was updated successfully, but these errors were encountered: