Support Topics Documentation Slack YouTube Blog

Event is not triggered after set relation

I am experimenting with the business logic event handler.
I created an event handler for Table A: afterAddRelation so that something happens when someone add a relation ship from table A to table B.

I ran the code runner and the it shows that it is successful by listening for events ( in the command prompt).

When I ago ahead and add a relationship then no events are triggered.

I even removed the code inside the

public void afterAddRelation( RunnerContext context, String columnName, String parentObjectId, Object childrenArrayORWhereClause, ExecutionResult<Integer> result )

and did the same test, the command prompt does not show any event being received. I verified everything connected by checking that the event handler is in debug mode in the console

Any idea why this could be happening?

Hello @snakeeyes

Relation one-to-one or one-to-many?
Event handler JS or Java?
Context event handler for all tables? Maybe you choice another table?