with an explicit many-to-many (join model) relatio...
# orm-help
j
with an explicit many-to-many (join model) relationship. How do I delete and also delete the relevant join models in one go? It throws an error if I try to just delete one of the joined records
r
Hey John 👋 Are you talking about cascading deletes?
j
hey -- yeah I guess it's pretty much cascading deletes. Imagine a user has_many groups and groups has_many user using a "member" table (to store a role in the group). If I want to delete a group I need to first delete all the member records for that group.
r
Yeah, regarding that there's an issue here for the Prisma Client so as a workaround, the best way to do that would be
prisma.raw
j
ah ok, thanks!