logoalt Hacker News

elevationyesterday at 9:53 PM2 repliesview on HN

I once boasted about avoiding ORM until an experienced developer helped me to see that 100% hand‑rolled SQL and customer query builders is just you writing your own ORM by hand.

Since then I've embraced ORMs for CRUD. I still double-check its output, and I'm not afraid to bypass it when needed.


Replies

ChromaticPanicyesterday at 11:39 PM

Exactly, and any good ORM will let you drop down to pure SQL if you need to for the weird cases.

yawaramintoday at 2:53 AM

Not really. ORMs have defining characteristics that hand-rolled SQL with mapping code does not. Eg, something like `Users.all.where(age > 45)` create queries from classes and method calls, while hand-rolled SQL queries are...well..hand-written.