Hacker News new | ask | show | jobs
by whofw 2053 days ago
Curious about your thoughts on TypeORM. Have you used it at scale at all? I rebuilt the API portion of an app using it a few months ago and instantly ran into issues with things like relationships and slightly more complex queries. I know it is an ORM and isn't suitable for every use case and definitely not super-complex queries, but it seemed very limited and unstable.

Honestly, I don't like any of the Node ORMs out there, especially when you compare them to more mature projects like Rails' ActiveRecord or Laravel's Eloquent.

4 comments

I've been using TypeOrm in production for a few years in a project with dozens of entity types and hundreds of queries. My recommendation is to use something else. Anyone know of an alternative?
Oh wow that is not reassuring at all, I'll look around for an alternative.
I haven't used typeorm for any real world projet yet. Although when I tried using the mongo driver, literally nothing worked. I also ran into problems from the generated migrations where I would get errors when trying to run them.

Even with these encountered problems, I'm still willing to give it a try for my upcoming project. I'll probably write an article on this if things go bad.

For sure, this is less mature then the others out there, but I think it has a bright future as it has a nice syntax and cool features.

Check out Prisma. It generates lot more complex types and supports relationships pretty well
I've been really interested in checking out Primsa, but I was a little concerned about putting an extra layer between the database and the app. I should give it another look.
I will definitely check this out, thanks for sharing!
Nikolas from the Prisma team here :) let me know if you have any questions, always happy to help! (You can ping me on the Prisma Slack [1], I'm `@nikolasburk` there as well).

Also note that we've just opened up an early access program for Prisma Migrate [2] (which enables schema and data migrations), would love to hear your thoughts on our approach!

[1] https://slack.prisma.io

[2] https://www.notion.so/prismaio/Public-Documentation-for-Pris...

Awesome, will definitely check that out!
I cannot recommend it. It has a bug on sqlite that swaps the arguments randomly. This is super bad.

For my next project, I will check out Mikro-Orm.

Thanks, I will check this out!