reverse foreign key #894
Answered
by
steve-chavez
sunillarsson
asked this question in
Questions
-
Is there a way to reverse the 'flow' of a foreign key in supabase? forward:
backward:
Is there an obvious way to this that I'm completely missing out on? |
Beta Was this translation helpful? Give feedback.
Answered by
steve-chavez
Mar 18, 2021
Replies: 1 comment 1 reply
-
From https://supabase.io/docs/postgrest/client/select#query-foreign-tables
const { data, error } = await supabase
.from('movies')
.select(`
title,
directors (
id, name
)
`)
const { data, error } = await supabase
.from('directors')
.select(`
last_name,
movies (
title
)
`) |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
sunillarsson
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
From https://supabase.io/docs/postgrest/client/select#query-foreign-tables