Hacker News new | ask | show | jobs
by Simpliplant 570 days ago
After being frustrated with Diesel, I gave a try to SeaORM and I couldn’t be happier (have been using it for more than a year). It is not perfect but certainly the best ORM I have ever used myself (vs Diesel, ActiveRecord, SQLAlchemy)
2 comments

How come? I’m new to the space and picked Diesel a couple weeks ago for a new project because it seemed the most recommended. What do you prefer about SeaORM?
To me, SeaORM feels like a well-designed library while many things in Diesel feel like an afterthought or a hack. Which mostly manifests itself when doing something complex and debugging it.

Also recommend reading https://www.sea-ql.org/SeaORM/docs/internal-design/diesel/

Please note that this comparison is outdated since at least 2 years, given that diesel-async exists for more than 2 years now and this page completely forgets to mention it.
I’ll check it out. Thanks!
sea-query looks a lot like jOOQ!
SeaORM is not compile time safe by their own admission so it's automatically out of the running, personally speaking.
That feels like a weird requirement to me; an ORM is by its very nature not going to be able to validate queries at compile-time.

And even if you're writing queries directly, any time you need to write something dynamic, you're not going to be able to verify those at compile-time either.

> an ORM is by its very nature not going to be able to validate queries at compile-time.

I don't see why this is by its "very nature" when libraries like diesel or Prisma already do this.

> any time you need to write something dynamic, you're not going to be able to verify those at compile-time either.

Diesel can validate dynamic queries at compile time too, sqlx too to some extent.