wrong result -> (zero or one) is shown as (one and only one)
7ganam opened this issue · 2 comments
7ganam commented
I have the following schema where an Incedent should have zero to one department but it is shown as one and only one departement
datasource db {
provider = "postgres"
url = env("DATABASE_URL")
}
model Incident {
id String @id @default(uuid())
assignedDepartment Department? @relation(fields: [assignedDepartmentId], references: [id])
assignedDepartmentId String?
// optional to allow for an incident to have no assigned department --- not unique to allow for multiple incidents to be assigned to the same department
}
model Department {
id String @id @default(uuid())
assignedIncidents Incident[]
}
Skn0tt commented
The bug probably lives somewhere around here:
prisma-erd/netlify/functions/render-dml-to-mermaid.ts
Lines 39 to 45 in 122b889
I'd be happy to review a PR, if you open one!
7ganam commented
The bug probably lives somewhere around here:
prisma-erd/netlify/functions/render-dml-to-mermaid.ts
Lines 39 to 45 in 122b889
I'd be happy to review a PR, if you open one!
sure, I will submit a PR today