Deleting a record from extend with JavaScript does not trigger frontend realtime event #3695
-
I use the backend extend with JavaScript On the frontend, I have the Is that the normal case? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
It is not normal but there are not enough details to help you debug it. Did you subscribe to the If you think that it is a bug with PocketBase, please create a miminal reproducible repo and I'll try to investigate it in more details. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
Raw DB queries don't trigger the realtime events.
They are triggered only when the
onModel*
hooks are fired, eg. when the related$app.dao().saveRecord()
or$app.dao().deleteRecord()
method is called.In the
onRealtimeDisconnectRequest
hook try to replace your delete query with: