Please, how do I delete cascaded tables in Prisma?...
# orm-help
b
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
@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
But if I keep the relation optional, can I still be able to use the relation in include??
r
Yes you can