Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

390
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!