I want to set the pdfId and the imageId of the release note to null when a file is getting deleted. I get the following issue
Error validating: When any of the records in model File is updated or deleted, the referential actions on the relations cascade to model ReleaseNote through multiple paths. Please break one of these paths by setting the onUpdate and onDelete to NoAction
Any ideas on that?
```model File {
id Int @id(map: "PK_FILE_ID") @default(autoincrement())
......
imageOfReleaseNotes ReleaseNote[] @relation("imageOfReleaseNotes")
pdfOfReleaseNotes ReleaseNote[] @relation("pdfOfReleaseNotes")
@@map("file")
@@schema("dbo")
}
model ReleaseNote {
id Int @id(map: "PK_RELEASE_NOTE_ID") @default(autoincrement())
....
releaseNoteToUsers ReleaseNoteToUser[]
pdf File? @relation("pdfOfReleaseNotes", fields: [pdfId], references: [id], onDelete: SetNull, onUpdate: NoAction, map: "FK_RELEASE_NOTE_PDF_FILE")
pdfId Int?
image File? @relation("imageOfReleaseNotes", fields: [imageId], references: [id], onDelete: SetNull, onUpdate: NoAction, map: "FK_RELEASE_NOTE_IMAGE_FILE")
imageId Int?
@@map("release_note")
@@schema("dbo")
}