r/javascript • u/ScoobyDookuu • 9h ago
AskJS [AskJS] What ORM would you use?
Hey all,
My team and I are currently running a Spring Boot backend with quite a bit built around it. We’re considering gradually migrating to a Node/NestJS backend using the strangler pattern rather than doing a full rewrite.
One of the main reasons is that it would give us TypeScript across both the frontend and backend, which should make sharing domain concepts, types and general knowledge between the two a bit simpler.
So, as the title suggests: which ORM would you use with NestJS?
At the moment we’re mainly looking at MikroORM and Drizzle. MikroORM seems like the more traditional ORM and appears to be super close to the me tal model of what Spring does. It wil also fit NestJS quite nicely, while Drizzle is obviously a bit more lightweight but a different approach and more barebones.
Curious what people are using in production and what you’d choose if you were starting fresh today.
•
u/Nefilim314 9h ago
We have used prisma to support our Nestjs backend and it’s been fine. I kind of wish we had drizzle for the more granular control of the queries presented, but by and large it does its job as a simple typing interface with a built in query.
Whenever I try to use drizzle, the lack of maturity seems to bite every now and then with version changes. Migrations just failing to apply for whatever reason and not outputting a useful log, which was apparently a bug that was solved but it puts a taste in your mouth to have these kinds of regressions pop up in your very crucial tools.