Remix.run Logo
Yokohiii 5 days ago

The way you describe it, it would be ideal if ORMs would only handle very basic CRUD and force you to use raw sql for complex queries. But that's not reality and not how they are used, not always. In my opinion some devs take pride to do everything with their favorite ORM.

I think if an app uses 90% ORM code with the remains as raw queries, a junior is inclined to favor ORM code and is also less exposed to actually writing SQL. He is unlikely to become an SQL expert, but using SQL behind a code facade, he should become one.

mattmanser 4 days ago | parent [-]

And the ORM free code has massive downsides, not limited to if you add/change a column code can break at runtime, not compile time.

The negatives of not using an ORM is far worse than the negatives of not reigning in some developers who shouldn't be making complex queries.

If they don't even know how to check the SQL their complex ORM query produces, that's a training problem, not an ORM problem.

It's one of our great weaknesses as a profession, assuming everyone will figure stuff out on their own.