© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4y ago•
10 replies
laubonghaudoi

How to query data using a join table?

The official doc doesn't provide any examples in querying using a join table: https://supabase.com/docs/reference/javascript/select#query-foreign-tables

So I have two tables
product
product
and
user
user
which have many-to-many mapping relationship, and I have a third join table
product_user
product_user
which has three fields:
id
id
,
product_id
product_id
and
user_id
user_id
.

How do I get all products that belong to a certain user in javascript?

I found the same issue here: https://github.com/supabase/supabase/discussions/1080
It says it was a limitation in 2021 and we can only do client-side filtering, what about now?
GitHub
Filtering on many-to-many relationship with join table · Discussion...
Hey folks! I have a question related to this discussion here and figured I'd break it out into it's own post. Basically, I'm using @kiwicopple 's suggestion to creat...
Fetch data: select() | Supabase
Performs vertical filtering with SELECT.
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

Is it possible to Query-join a table and storage ?
SupabaseSSupabase / help-and-questions
3y ago
How to make join query like
SupabaseSSupabase / help-and-questions
3y ago
How to query a table by multiple columns
SupabaseSSupabase / help-and-questions
4y ago
Using a view within a js API query to a table.
SupabaseSSupabase / help-and-questions
3y ago