Hacker News new | ask | show | jobs
by waisbrot 10 days ago
In my experience, ORMs save a little bit of writing SQL and then cost an unbounded quantity of time in debugging mysterious problems because knowing why a query is slow now requires understanding the DB, your own code, and also the ORM.
2 comments

In my experience ORM doesn’t save anything on writing queries. You still have to write somewhat same code that looks like sql query. You still need to know joins, you still need to know DB structure.

Getting rid of SQL queries is not the job of ORM.

ORM saves you time on object mapping boilerplate THAT IS THE JOB of an ORM it is right there in the name „object relational mapper”.

And also more loc than SQL usually. It's not even a deferred cost, it's at least slightly worse upfront