how to handle n:m relationship
jontacky opened this issue · comments
Tanye Jonathan commented
Hi, Thanks for this wonderful library,
What is the best way to handle a many-to-many relationship with this library?
Thanks
Marshall Thompson commented
It depends on your database tech, really.
If you're using MongoDB or Postgres with JSON columns, you'll be able to directly query from one array column to another array column.
If you're using a join table, you'll need to treat the join table as its own entity so that feathers can make queries against it. In this case, two queries will be made: one for the local table to the join table and another for the join table to the foreign table.