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
Ryan
05/15/2020, 9:33 AM
Hey John 👋
Are you talking about cascading deletes?
j
John Cantrell
05/15/2020, 10:58 AM
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
Ryan
05/15/2020, 11:07 AM
Yeah, regarding that there's an issue here for the Prisma Client so as a workaround, the best way to do that would be