How does supabase retrieve foreign table relationships?
I am using supabase nextjs stripe payments project and I came across this line of code:
Everything works, but how does it connect products with matching rows in the prices table? Products table itself has no
I would have imagined that we had to write something like
Everything works, but how does it connect products with matching rows in the prices table? Products table itself has no
prices column. Prices table do have product_id column, but how does it know automatically what to connect since we only wrote .select('*, prices(*)') .I would have imagined that we had to write something like
connect('prices').where('product_id).eq('id'), but it seems like it does this automatically?