© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4y ago•
66 replies
DesertRodent

Many to Many link only working one level

I have the following structure:

- Muscle_Regions
- Muscle_Region_Muscle_Parts (M:M)
- Muscle_Parts
- Muscle_Parts_Mucles (M:M)
- Muscles
- Muscle_Regions
- Muscle_Region_Muscle_Parts (M:M)
- Muscle_Parts
- Muscle_Parts_Mucles (M:M)
- Muscles


From a region level i am able to list all the muscle parts with the following query:


 let { data: muscle_regions, error } = await supabase
    .from<MuscleRegion>('muscle_regions')
    .select('*, muscle_parts (*)')
 let { data: muscle_regions, error } = await supabase
    .from<MuscleRegion>('muscle_regions')
    .select('*, muscle_parts (*)')



but when i try to do the same thing on the muscle_part level i don't get any results...

If I try this query it doesn't error but it doesn't show me any muscle results:


  let { data: muscle_regions, error } = await supabase
    .from<MuscleRegion>('muscle_regions')
    .select('*, muscle_parts (*, muscles(*))')

  let { data: muscle_regions, error } = await supabase
    .from<MuscleRegion>('muscle_regions')
    .select('*, muscle_parts (*, muscles(*))')


I have created composite keys and assigned them to the correct tables its just not rendering

Any clues?
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
Next page

Similar Threads

RLS One to many relationship
SupabaseSSupabase / help-and-questions
4y ago
How to model one to many?
SupabaseSSupabase / help-and-questions
3y ago
How to Disable Supabase Magic Link and Only Use OTP (One-Time Password) AuthenticationI am working
SupabaseSSupabase / help-and-questions
4mo ago
how to stream one to many relationship?
SupabaseSSupabase / help-and-questions
4y ago