© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4y ago•
2 replies
DeadlyDev

RLS One to many relationship

Maybe my brain is just not working correctly. I have done RLS policies for multiple relationships but I am struggling with this specific case. Hopefully someone can point me in the right direction.

I have a table
shopping_lists
shopping_lists
which has an owner (user id). I have another table
shopping_lists_items
shopping_lists_items
which has a shopping_list column that is a foreign key of shopping_lists_items.

I want an RLS policy that says a user can delete a row from
shopping_lists_items
shopping_lists_items
if it belongs to shopping_lists where the owner is the uid().

Hopefully I explained that well enough, if not I can try to elaborate. Thanks in advanced for any help!
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

RLS applying to many to many relationship
SupabaseSSupabase / help-and-questions
4y ago
how to stream one to many relationship?
SupabaseSSupabase / help-and-questions
4y ago
can't retrieve one to many relationship
SupabaseSSupabase / help-and-questions
4y ago
One-to-one relationship
SupabaseSSupabase / help-and-questions
4y ago