Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

545
Visualizações
Is there is any support for Single Table Inheritance in Prisma?

I have one project in Rails where I used Single Table Inheritance on Users Table, by creating two roles for Users table - 1.Clinician and 2.Patient. The model desc. is below

class Patient < User has_many :clinician_patients has_many :clinicians, through: :clinician_patients end

class Clinician < User has_many :clinician_patients has_many :patients, through: :clinician_patients end

Here I have another table clinician_patients :-

class ClinicianPatient < ActiveRecord::Base belongs_to :clinician belongs_to :patient end

I am new to Prisma and I want to use STI and relationships like Rails in Node using Prisma. How should I use STI in prisma models?

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

As you can see here prisma does not support table inheritance yet, but support is planned in the future.

There are some shim implementations you can try out until there is an official implementation:

  • https://github.com/smcelhinney/prisma-merge-schema
  • https://github.com/amplication/prisma-schema-dsl
over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda