Discussion about this post

User's avatar
Johann Schwarz's avatar

I read this, and I read your article In Defense of ORMs.

I am somewhat in that camp of ORM-haters that you are trying to address, but I don't think that we necessarily disagree - I suspect we may be using different definitions of what an ORM is. And maybe I'm wrong and being too narrow!

But, in my mind, ORM is a framework that tries to map object identity & lifetime back to the database. You know the classic ActiveRecord type pattern where if I have a User object and call `setEmail`, it's doing the SQL UPDATE transparently in the backend. I _do not_ hold that just any database utility framework is an ORM.

I gladly use utilities that can codegen type-safe systems around my database schema while hating on traditional ORMs, because like you I'm all-in on type safety and avoiding stringly-typing things.

Expand full comment
Gigi's avatar

To avoid complexity and keep using SQL you need something like a hybrid between ORM and SQL, something like SqlP https://dev.vvveb.com/sqlp

Expand full comment
5 more comments...

No posts