Dbugger
Dbugger
PPrisma
Created by Dbugger on 6/7/2024 in #help-and-questions
I can't disconnect a many-to-many relationship
This is the model, by the way:
model InvoiceContact {
// Relations
invoice Invoice @relation(fields: [invoiceId], references: [id], onDelete: Cascade, onUpdate: Cascade)
invoiceId String

contact Contact @relation(fields: [contactId], references: [id], onDelete: Cascade, onUpdate: Cascade)
contactId String

@@id([invoiceId, contactId])
}
model InvoiceContact {
// Relations
invoice Invoice @relation(fields: [invoiceId], references: [id], onDelete: Cascade, onUpdate: Cascade)
invoiceId String

contact Contact @relation(fields: [contactId], references: [id], onDelete: Cascade, onUpdate: Cascade)
contactId String

@@id([invoiceId, contactId])
}
3 replies
PPrisma
Created by Dbugger on 5/11/2024 in #help-and-questions
Refactoring schema
Nobody?
4 replies