Help defining Prisma schema
Hi guys I need some help defining my prisma schema.
I have this template schema in which I would like to add tags:
So I added the tags field and created a relation to this TemplateTag model:
But since the same tag can be used in a different Template, this does not make much sense I think, it would cause redundant data.
How do I create a proper pivot table or should I do this differently?
5 Replies
https://www.prisma.io/docs/concepts/components/prisma-schema/relations/one-to-many-relations By looking this your TemplateTag should be like
hmm so what exactly would that change?
Saving the tags while saving the template does not seem to work using that relation I am doing this:
Shouldn't it be this?
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
@FooBarWiggle sooo is my first attempt correct?
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View