Hi! Is it really not possible to do something like...
# prisma-client
b
Hi! Is it really not possible to do something like:
Copy code
model Typebot {
  id        String           @id @default(cuid())
  publishedTypebotId String? 
  publishedTypebot Typebot? @relation("PublishedUnpublished", fields: [publishedId], references: [id])
  typebot          Typebot?  @relation("PublishedUnpublished", onDelete: Cascade)
}
I get:
Copy code
Error parsing attribute "@relation": The relation field `typebot` on Model `Typebot` must not specify the `onDelete` or `onUpdate` argument in the @relation attribute. You must only specify it on the opposite field `publishedTypebot` on model `Typebot`.
I'd really like to delete the
publishedTypebot
if
typebot
is deleted