I’m creating an app on WeWeb with Supabase. I want to search for publications created by the user to make up their public profile, and display them in a list component, so far without any problems for me.
Now for each line in the list, which displays the posts, I want to look for the comments on the post.
I have the “post” table with the “post_id” field, and the other fields. And I have the “commentary” table which, among the other fields, has the “commentary_post_id” field related to the “post_id” field of the “post” table.
I want to create a collection that only searches for comments related to each post that is being displayed in the list. Searching the “comment” table, filtering the comments so that the “comment_post_id” field is the same as the “post_id” field of the current line of the post list.
Any suggestions on the best approach to do this?