jdgamble555 / j-supabase

11 stars 1 forks source link

Cannot subscribe to a pivot table #4

Open Towerful opened 1 year ago

Towerful commented 1 year ago

Often pivot tables are constructed using a composite primary key to establish a relationship between 2 tables.
Supabase/postgREST allows for "collapsing" the pivot table data when used like this.

Allowing an array as the idField and checking appropriately allows to subscribe to pivot tables.

--PR incoming...-- No PR incoming, cause I didnt branch

Towerful commented 1 year ago

Ah, shoot. I messed up the commit.

https://github.com/Towerful/j-supabase/commit/5195cbcd0de6e85c9790db4c99daa4a7325d47b8

details the change