Docs update suggesstion: How to use Join field with your own junction table #13412
abdhass
started this conversation in
Feature Requests & Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I’ve been looking into the docs and I was confused about how to use the Join field to have full control over a database schema. It mentions that we can define our own junction table and use it with the Join field, but it doesn’t explain how to do it. I’ve spent a long time to figure it out.
It would be really helpful if the docs could explain how to use the Join field. For example, do we need to give the junction table a specific name so that it doesn’t create its own _rels table to the junction table?
Here are my suggestions for changes to the docs:
If you want to define your own “junction” collection, you can achieve complete control over the shape of that junction table. For instance, you could create a collection called categories_posts that has a relationship type field called post_id and a relationship type field called category_id. This would allow you to have complete control over the shape of the junction table.
Beta Was this translation helpful? Give feedback.
All reactions