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
I'm using an EntityHook to sign up for changes in the database. When an entry is deleted, I want to create an entry in another table.
My problem is that when I'm using a Table.deleteWhere() clause, EntityHook is not invoked.
The only place where that entity hook is invoked, judging by the source code, is when the delete() method of the entity is called
(Entity.kt line 249)
I want to listen to changes on any operation on a given table. How can I do this without using database triggers?
The text was updated successfully, but these errors were encountered:
I could resolve this issue by creating special functions, but I guess this is not what you want, since EntityHook and StatementInterceptors have separated mechanics.
What I did was creating special functions that only should be used when making a CRUD operation, else, a normal transaction block would be used for selecting values. These functions had a lambda parameter called onDatabaseChanged, and, with the use of flows, emit the changes from the readers. It is quite complex so if you want to see the sample code just reply.
I'm using an EntityHook to sign up for changes in the database. When an entry is deleted, I want to create an entry in another table.
My problem is that when I'm using a Table.deleteWhere() clause, EntityHook is not invoked.
The only place where that entity hook is invoked, judging by the source code, is when the delete() method of the entity is called
(Entity.kt line 249)
I want to listen to changes on any operation on a given table. How can I do this without using database triggers?
The text was updated successfully, but these errors were encountered: