Replies: 1 comment 1 reply
-
No. Views don't have create/update/delete events because views are practically "dynamic/computed" collections and they don't store or have data on their own (a View collection could be anything including just |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a collection
posts
and I have setup a viewpostsView
for the same collection which has some additional fields such asrepliesCount
andlikesCount
which is populated by joiningposts
withreplies
andlikes
table and getting the relevant count. This all works as expected. However, I would like to setup a hook which is triggered after a post is created or updated, but I want to use data frompostView
in this hook (I am exporting this data to a different app (meilisearch))I could setup the AfterCreate/AfterUpdate hook and then fetch data from
postView
(app.Dao().FindRecordById("postView", record.Id)
), but wanted to understand if there is a way to listen to the changes on the view itself.Beta Was this translation helpful? Give feedback.
All reactions