-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Description
Describe what you want
I'm looking for a Typesafe ORM that support for polymorphic associations.
To give a concrete example:
I have a Comment
model. I need this model to be associated with both Article
and Photo
models.
Instead of creating separate tables or associations for comments on articles and comments on photos, I would prefer a unified approach where a single Comment
can belong to either an Article
or a Photo
.
Most ORMs (and query builders) except Prisma support polymorphic association.
Prisma is not taking interest in solving this issue: prisma/prisma#1644.
If you plan on implementing Prisma, that would be a killer feature that would be a reason in itself to use Drizzle.
A few teams have mentioned it explicitly in that issue.
Do you plan to support and document this feature in the near future ?