Hacker News new | past | comments | ask | show | jobs | submit login

Exactly. Or more explicitly, the anti-ORM argument, to me, consists of: ORM works fine for A through W, but SQL is better for X, Y, Z. So rather than just the common sense solution of writing just X,Y,Z in raw SQL, everything has to be written in raw SQL.



The argument works both ways; in fact, I think it's worse the other direction. Most projects use the ORM and just the ORM and it's against policy to write anything in raw SQL even if it's better for X, Y, Z.


I'm sorry but I don't think you're telling the truth.

I've never encountered in real life, or during any online discussion, the all-or-nothing sentiment from advocates of ORM.

Could you link to anything online where an ORM advocate argues that you should never drop down to raw SQL?


The attitude is prevalent in the design of many ORMs. I'm both a huge advocate of ORMs and of SQL. A good ORM provides a simple and direct mapping from storage to the object model. But most ORMs go beyond that and try to cover all the query and performance possibilities available from SQL. Some ORMs have their own text-based query language!

I've met developers who can happily (and effectively) work with an ORM but hardly even know SQL! They certainly don't know SQL well enough to use it in the situations were it would be most effective.

I'm starting to feel like really effective set-based understanding of SQL is becoming sort of a lost art.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: