How to handle inheritnace with Prisma?

Viewed 430

is there a way to manage inheritance in prisma ? I have a table baseUser which contains some basic columns like name, email, password,... I also have a second table which represents a customer and I want it to contain all baseUser columns without duplication. I've tried to set a one-to-one relation but I wondered if there is any other solution like inheritance for instance.

Thanks in advance.

1 Answers

Inheritance is not currently supported in Prisma.

There is an existing issue which describes progress and ideas on how schema.prisma file can support implementing interfaces where multiple models could implement the same interface.

Inheritance GitHub Issue

Related