W
Wasp-lang11mo ago
cubub

Many to Many relationship example?

Hello, I'm trying to find example of many-to-many relationship but haven't found one. Is anyone have experience doing that?
5 Replies
MEE6
MEE611mo ago
Wohooo @cubub, you just became a Waspeteer level 1!
Fecony
Fecony11mo ago
As wasp is using prisma you can search for examples by googling prisma many to many. You will find official docs on this topic and also prisma has a playground with different topics on how to do X thing https://playground.prisma.io/
Prisma Playground | Learn the Prisma ORM in your browser
Prisma Playground | Learn the Prisma ORM in your browser
The Playground is an interactive learning environment for Prisma. Learn how to send database queries and explore migrations workflows with the Prisma ORM.
cubub
cubub11mo ago
Thank you @Fecony , I can do the modeling part with Prisma (with explicit relation). What I'm looking for is the sample code of queries and actions so it can save me as bit of time learning it faster. Nvm, I will have to do it if there is nothing exist btw.
Fecony
Fecony11mo ago
But the code is the same It’s same prisma client
matijash
matijash11mo ago
Prisma
Many-to-many relations
How to define and work with many-to-many relations in Prisma.