Baptiste Arnaud
02/02/2022, 9:49 AMmodel Typebot {
id String @id @default(cuid())
publishedTypebotId String?
publishedTypebot Typebot? @relation("PublishedUnpublished", fields: [publishedId], references: [id])
typebot Typebot? @relation("PublishedUnpublished", onDelete: Cascade)
}
I get:
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