Im new to nest and as i can see nest gives very good support for typeorm, but i have seen so much post and articles about typeorm that its not good for production, it has bad type support, it has sql query issues etc etc. and people recomends drizzle insted of typeorm, so if this is true then why nest gives full support for typeorm ?? is there anything special with typeorm and nestjs ??
#Drizzle or typeorm
11 messages · Page 1 of 1 (latest)
TypeORM is used in production by tons of companies, startups and side projects - It's also pretty stable as its been around forever. TypeORM integrates nicely with NestJS really well too. People complain about it but usually its just echo's of other people's complaints. I'd start with it and see if you run into any issues yourself - which I highly doubt you will.
Drizzle is the new kid and is shilled/hyped by pretty much every content creator thus is why you hear it all the time probably. It hasn't even hit a 1.0 release yet and has no integrations into nestJS - meaning you'll have to do a good amount of mapping and manual work to achieve some of the things TypeORM achieves out of the box.
That being said im using drizzle in my projects, one of which is in prod. I chose it because I'm a fan of keeping sql closer to the heart and I'm already proficient in it; which makes drizzle feel more natural for me.
so it mean i can use typeorm on production ??
Yes
alright thanks u for the help :))
one more doubt, in drizzle the error handler is kinda bad or hard to manage, so will i get better error handling with type orm ?
Just my 2 cents - I used TypeORM on my previous company project and it is robust, well documented and the de-facto ORM for NestJS so you cant really go wrong with this decision.
A few months ago I started a new project and decided to go with Drizzle instead, I got rid of TypeORM & class validator/transformer.
I am now using Drizzle & Typebox along side https://github.com/jayalfredprufrock/nestjs-typebox, shoutout to @pliant shell!
In terms of developer experience I am enjoying it much more (very subjective) and generally the performance of my API has been a lot better (faster start up times, low resource usage).
I am taking a risk by using this as its less documented and if I come across an issue i've got much less support available. So i would say depending on your experience & risk appetite, the choice is yours 🙂
as this is my personal project and im quite fimilar with drizzle except the drizzle error handling so what should i choose?
One thing i forgot to mention, which i didnt find out until it was too late, is that drizzle does not have a migration rollback feature yet (coming soon). If its a personal project I would say give Drizzle with Nest a go!
alr, as i already added the drizzle but saw nest has official support for typeorm thats why i was little bit in doubt