Aissam Chia
Aissam Chia

Reputation: 43

How to handle inheritnace with Prisma?

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.

Upvotes: 2

Views: 2058

Answers (1)

Nurul Sundarani
Nurul Sundarani

Reputation: 7568

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

Upvotes: 1

Related Questions