Chip Clark
09/07/2021, 9:43 PMHRDepartment, JobTitle, JobType, LegalDepartment, OfficeLocation, Person, Photo are updated or deleted, the referential actions on the relations cascade to model PersonRelationship through multiple paths. Please break one of these paths by setting the onUpdate and onDelete to NoAction. (Implicit default `onUpdate`: Cascade) Read more at https://pris.ly/d/cyclic-referential-actions
--> schema.prisma:602
|
601 | ValidToDate DateTime
602 | RelatedPerson Person @relation(name: "RelatedPerson", fields: [RelatedPersonID], references: [PKPersonID])
603 | SupportedPerson Person @relation(name: "SupportedPerson", fields: [RelatedPersonID], references: [PKPersonID])
model PersonRelationship {
PersonRelationshipID Int @id @default(autoincrement())
PKPersonID Int
RelationshipTypeID Int
RelatedPersonID Int
Description String? @db.VarChar(Max)
Active Boolean
ActiveFromDate DateTime @db.Date
ModifiedDate DateTime @db.DateTime
ModifiedBy String @db.VarChar(30)
ValidFromDate DateTime
ValidToDate DateTime
RelatedPerson Person @relation(name: "RelatedPerson", fields: [RelatedPersonID], references: [PKPersonID], onDelete: NoAction, onUpdate: NoAction)
SupportedPerson Person @relation(name: "SupportedPerson", fields: [RelatedPersonID], references: [PKPersonID], onDelete: NoAction, onUpdate: NoAction)
Person Person @relation(name: "PrimaryPerson", fields: [PKPersonID], references: [PKPersonID], onDelete: NoAction, onUpdate: NoAction)
RelationshipType RelationshipType @relation(fields: [RelationshipTypeID], references: [RelationshipTypeID])
@@unique([PKPersonID, RelatedPersonID, RelationshipTypeID], name: "nclunq_PersonRelationship_PKPersonID_RelatedPersonID_RelationshipTypeID")
}tom
09/08/2021, 6:15 AMnoAction and you see this message, it's probably a bug. Would you be comfortable sharing your whole schema?Julius de Bruijn
09/08/2021, 6:50 AMJulius de Bruijn
09/08/2021, 6:51 AMChip Clark
09/09/2021, 6:19 PMJulius de Bruijn
09/13/2021, 8:17 AMJulius de Bruijn
09/13/2021, 8:17 AMprisma db pull with the version 3 before using the client?Julius de Bruijn
09/13/2021, 8:18 AMJulius de Bruijn
09/13/2021, 8:20 AMprisma db pullJulius de Bruijn
09/13/2021, 8:20 AMJulius de Bruijn
09/13/2021, 8:22 AMJulius de Bruijn
09/13/2021, 8:23 AMChip Clark
09/13/2021, 3:11 PMChip Clark
09/13/2021, 3:13 PMChip Clark
09/13/2021, 3:51 PMRUST_BACKTRACE=1 environment variable to display a backtrace
Error: Unexpected token E in JSON at position 0Chip Clark
09/13/2021, 3:55 PMJulius de Bruijn
09/13/2021, 8:18 PMChip Clark
09/13/2021, 10:12 PMChip Clark
09/15/2021, 10:29 PM