Please, how do I delete cascaded tables in Prisma? I have having user table in relation with user_priviledges and I want a situation where if I delete a user, it should as well delete the user privileges but I'm getting error
r
Ryan
05/31/2021, 6:55 AM
@Beyond 👋
Cascade deletes will only work if the relation is optional. Currently there’s an issue for the same so a workaround to this is keeping the relation optional and cascade deletes will work.
👍 1
b
Beyond
05/31/2021, 6:57 PM
But if I keep the relation optional, can I still be able to use the relation in include??