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

clarification about creating many to many using the content type builder #56

Closed
cocodrino opened this issue Oct 28, 2018 · 6 comments
Closed
Assignees

Comments

@cocodrino
Copy link

hello guys, I was seeing that the content type builder allows you to create many to many relationships, since to do this you need an intermediate table, is it possible to create this relationship using the content type builder? no need for code or configuration? is there any guide to do this?

I suppose there must be a convention regarding the names of the columns, for example, I have the table article and tag, I created a content type called article_tag which will work as junction table and I try to set the id of the article with the column article_id of my junction table but the system does not allow me to do it.

image

Any guide will be appreciate...I'm using postgresql...

thank you!!!

@lauriejim lauriejim self-assigned this Oct 28, 2018
@lauriejim
Copy link
Contributor

Strapi will automatically generate all the stuff to make the relation work.

@cocodrino
Copy link
Author

thank you @lauriejim , then in my strapi project with two tables, articles and tags how must I set the relationship? must the field names be the id no?...thank

@lauriejim
Copy link
Contributor

In your Article model you set tags and in you Tag models you set articles

@rkneel123
Copy link

can we modify the junction table if we want to add another field in this table?

@Ghospel
Copy link

Ghospel commented Aug 14, 2020

can we modify the junction table if we want to add another field in this table?

I would like to know this aswell

@EndlessBox
Copy link

i would love to know this too !

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

5 participants