Multiple one-to-one relations with referential actions
Hey, am I understanding it correctly that this is a limitation of Prisma (or SQL?)?
My goal is to have two one-to-one relations but defined on the
PaymentParty
side to be able to define onDelete: Cascade
so the PaymentParty
entities get deleted on Payment
delete. I tried numerous solutions and the closest to what I'm trying to achieve is to define the scalar relation fields on the Payment
side. And that's a viable solution but then I cannot set the referntial action for Payment
and would have to delete the parties in code. Payment
sender and recipient should of course be required.
Any insight on this would be greatly appreciated, thanks!![No description](https://cdn.answeroverflow.com/1255881231816462448/image.png)
0 Replies