tzezar
tzezar
Explore posts from servers
PPrisma
Created by tzezar on 5/15/2024 in #help-and-questions
Does prisma allow use of Shared Primary Key?
if so, what should the model look like? Sorry if this has already been asked somewhere, I can't find anything.
2 replies
PPrisma
Created by tzezar on 4/30/2024 in #help-and-questions
MTI key relation
model Supertype {
id Int @id @default(autoincrement())
Subtype Subtype[]
}

model Subtype {
id Int @id
supertype Supertype @relation(fields: [id], references: [id])
}
model Supertype {
id Int @id @default(autoincrement())
Subtype Subtype[]
}

model Subtype {
id Int @id
supertype Supertype @relation(fields: [id], references: [id])
}
Is this valid code to describe foreign keys between two entities?
5 replies