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

Content type builder #88

Closed
adds08 opened this issue Apr 27, 2019 · 1 comment
Closed

Content type builder #88

adds08 opened this issue Apr 27, 2019 · 1 comment

Comments

@adds08
Copy link

adds08 commented Apr 27, 2019

Hey guys !

I really like Strapi but I am scratching my head with SQL-db relation.

So a user can create many "Messages"
but user can subscribe to only one message from other User

In SQL I have 3tables for it but how to build it using the content-type-builder

Thank you

@lauriejim
Copy link
Contributor

Hello!

You will have to create 2 relations.
One for the "creation" User(messages) <- oneToMany -> Message(author)
And one for "subscription" User(subscription) <- manyToOne -> Message(subscripters)

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