3 ms·
I have to agree. ORMs can be great when an application is just starting, because that's when you're writing the most tedious queries and statements, but beyond
by saryant 9y ago
I have to agree. ORMs can be great when an application is just starting, because that's when you're writing the most tedious queries and statements, but beyond that I personally find that ORMs just get in the way.
As soon as I need to write something more complicated than select-by-id I end up reaching straight for SQL. Otherwise I have to learn both the ORM's query API or DSL and have the proper mental model for how it translates to actual SQL.
Or I could just write SQL and be done with it. No mysteries.
Maybe this is just me, but I've never written a join in an ORM that I had the slightest bit of confidence in.
- ProblemFactory 9y agoAny discussion on ORMs needs to consider what sort of app and queries you are writing. ORMs are fantastic for the very common case: * Fetch 20 rows and display them as a table, * Fetch 1 row by primary key and display it as a form, * Write updated fields from the form back into the 1 row in the database. Anything more complicated, and direct SQL starts being more attractive. But for the common case that ORMs are designed for, they are a major productivity boost.