feathersjs / feathers

The API and real-time application framework
https://feathersjs.com
MIT License
14.97k stars 742 forks source link

Many-to-many / join tables #3471

Open EmileSpecs opened 2 months ago

EmileSpecs commented 2 months ago

Hi

It is not clear to me how to approach many-to-many / join tables in Dove (v5).

I can create a service for each, but that doesn't seem optimal since I'll never really directly use the service as those tables will just be used to resolve relational data.

But if I don't have those services and just use migrations to add the tables, there's no schema etc for these tables. Or is it just best practice to create a service for all tables (and then restrict external calls to the service)?

Is there any advice on how to approach this? I haven't found anything on this anywhere I searched...

Thanks!