Select from joining table returns wrong data
I use the @nuxtjs/supabase module.
I have a table "challenges" and two join tables "profile_challenge" (to assign the challenge to a profile) and "challenge_category" (to assign categories to the challenge). Both of these join tables are identical and store only the respective ID's of both reference tables. The respective tables "categories" and "profiles" are very simplistic and only contain an id and some text columns.
I make a request like this:
While I get the correct category data, the profile data is somehow wrong. For all 5 challenges i get the same profile data, even when 2 challenges are assigned (through the join table) to a different profile.
How could it be that the categories work fine, and an identical table & request does not?
Thanks for your help
Simon
I have a table "challenges" and two join tables "profile_challenge" (to assign the challenge to a profile) and "challenge_category" (to assign categories to the challenge). Both of these join tables are identical and store only the respective ID's of both reference tables. The respective tables "categories" and "profiles" are very simplistic and only contain an id and some text columns.
I make a request like this:
.from('challenges').select('*, profiles(id, username), categories(title, image_url)')While I get the correct category data, the profile data is somehow wrong. For all 5 challenges i get the same profile data, even when 2 challenges are assigned (through the join table) to a different profile.
How could it be that the categories work fine, and an identical table & request does not?
Thanks for your help
Simon