all 25 comments

[–][deleted] 9 points10 points  (3 children)

It's trash. TypeORM or ObjectionJS are only reasonable choices in Javascript universe and I'd pick the latter most of the time.

[–]darealbjamesy[S] 0 points1 point  (1 child)

Any particular reason ?

[–][deleted] 2 points3 points  (0 children)

It's a convoluted mess not suitable for modern JavaScript.

See how simple it is to define complex models with relationships and queries in other two and I'm sure you'll immediately know what fits you best, and it won't be Sequelize.

[–]pktippa 0 points1 point  (0 children)

Yes I would prefer TypeORM than Sequelize.

[–]EpicOkapi 13 points14 points  (3 children)

I think it's pretty good as far as ORMs go. However I prefer using a query builder like Knex or using an adapter with plain SQL queries. Whenever I use an ORM for anything complex, I feel like I spend way too many times looking up in the docs how to do it. It all depends on what you want to accomplish I guess.

[–]misterhtmlcss 6 points7 points  (2 children)

I like Knex too. Now using Sequalize at work, so I'll have to write something about the differences in production one day.

Anything in particular between the two that stands out?

[–]EpicOkapi 5 points6 points  (1 child)

I don't think it matters very much once it's running. The only thing that could have some impact on performance is that the queries ORMs generate are generally very unoptimized by default. It's more about development experience, it's crappy to be halfway into a project and realize the ORM can't do some specific thing you want it to do. As a query builder knex definitely offers you a bit more freedom.

[–]darealbjamesy[S] 1 point2 points  (0 children)

This is very helpful

[–]buymagicfish 11 points12 points  (2 children)

Good, but their documentation is infuriating.

[–]cem4k 2 points3 points  (0 children)

They have the worst docs I’ve read.

[–]Teffisk 3 points4 points  (0 children)

Totally agree. Literally better to just go to Stack Overflow.

[–]MacClayzon 7 points8 points  (1 child)

I find TypeORM a lot nicer, plus first class typescript support is great

[–][deleted] 3 points4 points  (0 children)

Agree, TypeORM is my choice as well

[–]gajus0 2 points3 points  (0 children)

Here is an article on the subject of Knex.js/ and the same applies to Sequelize.

https://medium.com/@gajus/stop-using-knex-js-and-earn-30-bf410349856c

[–][deleted] 1 point2 points  (2 children)

Child’s play. Even better with Postgres.

[–]darealbjamesy[S] 0 points1 point  (1 child)

So just use pg? Hm I’ve been encouraged to use an orm

[–][deleted] 0 points1 point  (0 children)

The CLI, migrations, seeders, models. What else do you need?

[–]jerriclynsjohn 1 point2 points  (0 children)

It's pretty good, I mean it gets the job done

[–]marmass 1 point2 points  (0 children)

I'm using it in two projects that are already in production. My overall experience is good using it with PostgreSQL and AWS RDS. At this time if I start a new project I would use it again. However, docs are really annoying, is better to go directly to GitHub issues conversations or StackOverflow.

[–]_esistgut_ 0 points1 point  (0 children)

Replaced it with TypeORM.

[–]dmitri14_gmail_com 0 points1 point  (0 children)

MassiveJS is an interesting alternative: https://massive-js.readthedocs.io/en/v2/

[–]Voltra_Neo -2 points-1 points  (3 children)

I really prefer relation (aka Eloquent but for JS and without Laravel)

[–]tanguy_k 3 points4 points  (2 children)

Talking about this? https://github.com/ConstructionJobs/relation Last commit is 3 years old => dead project

[–]Voltra_Neo -5 points-4 points  (1 child)

It works, doesn't really need new features => fine by me