I've renamed a table, deleted and re-created the f...
# help
r
I've renamed a table, deleted and re-created the foreign key constraints but somehow the query fails because something thinks there are multiple relationships. But I can only see the correct relationships. I've restarted the server. I've run
NOTIFY pgrst, 'reload schema'
to reload the schema cache. Any other ideas?
I've also specified which column the relationship is supposed to use using the
table!foreign_key_column
notation.
Another interesting data point: It works when I select
*
and do not specify the columns I want.
Another interesting data point: It seems to have to do with the order of the columns. If I specify the relationship table FIRST and then the foreign key column it works. If I specify the foreign key column first and then the relationship table it fails.
Copy code
// FAILS
supabase
  .from('table1')
 .select(id,foreign_table_id, foreign_tables(*))

// WORKS
supabase
  .from('table1')
 .select(*, foreign_tables(*))

// WORKS
supabase
  .from('table1')
 .select(id, foreign_tables(*), foreign_table_id)