How to delete One-to-many self relations in Prisma?

I define the discussion model as a 1-to-m self-relationship.

But something goes wrong when I delete parent discussions (discussions with many replies).

It's totally fine if I delete the discussion without any reply.

How can I properly modify or delete? Thanks!
image.png
image.png
image.png
Was this page helpful?