Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

389
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda