inner join without foreign key relationship
Is it possible to do an inner join with supabase js client without "direct" foreign key relationship?
Working SQL example in supabase sql editor:
select profiles.first_name, profiles.last_name, user_id
from profiles
inner join organization_users
on organization_users.user_id = profiles.id
where organization_users.organization_id = 1
Tables:
profiles
When I try the following js code I get an error message "Could not find a relationship between 'profiles' and 'organization_users' in the schema cache":
await supabase
.from("profiles")
.select(",organization_users()")
Working SQL example in supabase sql editor:
select profiles.first_name, profiles.last_name, user_id
from profiles
inner join organization_users
on organization_users.user_id = profiles.id
where organization_users.organization_id = 1
Tables:
profiles
- id
- first_name
- id
- user_id
- organization_id
When I try the following js code I get an error message "Could not find a relationship between 'profiles' and 'organization_users' in the schema cache":
await supabase
.from("profiles")
.select(",organization_users()")