Skip to content

reverse foreign key #894

Discussion options

You must be logged in to vote

From https://supabase.io/docs/postgrest/client/select#query-foreign-tables

forward:

const { data, error } = await supabase
  .from('movies')
  .select(`
    title,
    directors (
      id, name
    )
  `)

backward:

const { data, error } = await supabase
  .from('directors')
  .select(`
    last_name,
    movies (
      title
    )
  `)

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@sunillarsson
Comment options

Answer selected by sunillarsson
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants