Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Many-to-many / join tables #3471

Open
EmileSpecs opened this issue Apr 23, 2024 · 1 comment
Open

Many-to-many / join tables #3471

EmileSpecs opened this issue Apr 23, 2024 · 1 comment

Comments

@EmileSpecs
Copy link

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!

@indatawetrust
Copy link

Creating a relation service and tracking the relationships through it seems like the best option. For example, let's assume there are two services named post and category. You can proceed by creating a service called post-category-relation and keeping the post and category id information there. If necessary, you can access this service through the schemas of the post and category services.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants