Skip to content

Multiple relations between two entities results in overlapping visualized relationships #80

@Maxim1507

Description

@Maxim1507

It appears that if there is more than one relation between two entities the lines overlap and they can not be separated (which would be useful for clarity and to avoid confusion). See example below.

datasource db {
  provider = "postgresql"
  url      = env("DATABASE_URL")
}

generator client {
  provider = "prisma-client-js"
}

model Step {
    id Int @id() @default(autoincrement())
    title_de String @db.VarChar(255)

    parent_option_id Int? @unique()
    parent_option Option? @relation("step__parent_option", fields: [parent_option_id], references: [id])

    options Option[] @relation("option__step")
}

model Option {
    id Int @id() @default(autoincrement())
    step_id Int 
    step Step @relation("option__step", fields: [step_id], references: [id])
    childStep Step? @relation("step__parent_option")
}

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🐛Something isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions