Hi, I have a Postgres DB with cascade delete activ...
# orm-help
d
Hi, I have a Postgres DB with cascade delete activated for a foreign key on my table. When I attempt to execute a deletion directly in my database, the cascade works just fine. However, when I execute it in Prisma, I’m getting the following error:
Copy code
message": "\nInvalid `prisma.schedule.delete()` invocation:\n\n\n The change you are trying to make would violate the required relation 'ScheduleTotimeSlot' between the `Schedule` and `timeSlot` models.",
How do I get Prisma to understand Postgres is cascading on delete?
r
@Daniel Sieradski 👋 What version of Prisma are you on? This should be possible using referential actions: https://www.prisma.io/docs/concepts/components/prisma-schema/relations/referential-actions