News for hackers. Stuff that matters.
Re:What ORMs have taught me: just learn SQL (2014) by tigershark on Friday September 20, 2019 @07:36PM (#21032386)
Or maybe you worked only on “toy” projects and never understood that you are doing more work that could be expressed more elegantly in a functional SQL expression instead of using the imperative statements of the ORM engine? The craziest thing in this discussion is that I have to defend SQL that is probably my least favourite language... I never expected this honestly.
Re:What ORMs have taught me: just learn SQL (2014) by Daishiman on Friday September 20, 2019 @07:49PM (#21032457)
My "toy" project with several hundred tables and tens of thousands of users does fine.

I have, at most, a couple dozen "complex" queries in this project.

Whereas I have an order of magnitude more queries that need to be composed from several different query criteria, a task for which SQL is very poorly optimized for and most ORMs excel at.

I have used my ORM for so long that writing a report in SQL or the ORM language is basically the same to me. Neither technology is something I would consider to be "hard", as most of the problems encountered in practice are well-trodden.

Nontheless, a simple ORM query is 20% the length of an equivalent SQL query. And I can compose them trivially. And then I use the model code for the _hard_ part: dealing with the rest of the business logic for template rendering, email sending, API interactions, and so on, for which SQL is completely useless.

Re:What ORMs have taught me: just learn SQL (2014) by pknopf on Friday September 20, 2019 @08:58PM (#21032775)
Your "toy project" doesn't have 10+ team members, ranging in experience.
Re:What ORMs have taught me: just learn SQL (2014) by Daishiman on Saturday September 21, 2019 @10:00AM (#21035418)
Yes it does.

Seriously using an ORM is just not hard. Especially if actually do code reviews with your junior team members, which you should always be doing.