|
|
|
|
|
by bdcravens
464 days ago
|
|
Sure, both tools are great options to have in your toolbox. My bigger issue was with the claim that you can't build an application bigger than arbitrary size X without an ORM, which is empirically untrue. I will say that there are queries that take 2-3 minutes to write in SQL where you have to bang your head into the wall to make the problem fit into an ORM-shaped box. (and vice versa) A bigger problem are developers who haven't never truly learned to write SQL (outside of a few basic statements; akin to a React developer who never really learned Javascript) |
|
You can write any possible SQL query in SQL, but you can't write all of them in an ORM (without falling back to native SQL queries)
SQL is strictly more powerful.
Sometimes it's also way more verbose.
So I agree that you should be able to leverage both tools, but they are not even remotely as powerful.
I every project we used ORM for, at some point we had to jump through hoops and write plain old SQL (depending on the language and framework that's simple or terribly complex), because we had to fix the n+1 query problem.
In every project, since more than 18 years!