Both TypeORM and Mikro-ORM? #8747
-
Just a general development question because I find it interesting and I would like to understand things better. Why the choice to use both of these? Was this originally developed in TypeORM and then decided to gradually move things over to to Mikro-ORM, or are there more/other reasons both are used? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
@PrimeDominus a very good question, we decided to support both TypeORM and Mikro-ORM for the following main reasons (there were more, but those are really primary): Hope it makes sense, |
Beta Was this translation helpful? Give feedback.
-
Yeah I think the future of TypeORM is too uncertain. For a full ORM experience the wisest option is to use Mikro-ORM. Our team made a private template nestjs repo that was structured and configured so that a developer could select from Mikro-ORM, Prisma, Drizzle-ORM, or Kysely by just configuring a small part of The way it's implemented in ever-gauzy is really interesting though. It's kind of like the reverse of what we've done, in that you have a standard implementation for entities/schema with models and have it configured so that either TypeORM or Mikro-ORM can work with that. It will be really interesting to see how this can be used to work with Prisma in the future. |
Beta Was this translation helpful? Give feedback.
@PrimeDominus a very good question, we decided to support both TypeORM and Mikro-ORM for the following main reasons (there were more, but those are really primary):
a) TypeORM had (have?) issues with maintenance and we wanted to make sure we are using some ORM that very well-supported and will not be gone for long, so Mikro-ORM sounds like a good choice (and from what I see so far it's frequently updated repo)
b) There were critical bugs in TypeORM that were NOT fixed for long and it made us issues running the platform in production... So we wanted to illuminate that while the TypeORM team fixing those bugs, so we added another ORM :)
c) This one is actually the most important strategical…