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

well, most ORMs give you the ability to drill down into native queries if you want, and often even will help you with the conversion into native objects if what you are pulling back is still a native object. So it's not a binary thing, you can use ORMs to reduce the amount of boilerplate for simple queries and then where it makes sense you can drill down into native SQL.

(a lot of what ORMs give you is just a reduction in boilerplate code, manually populating 30 different fields on an object and so on.)




in my anecdotal experience this almost never happens because devs have an aversion to putting SQL in the code.


Most simple queries won't benefit much from hand-coded SQL and it's always there for the minority of the ones that do.

And again, there is the middle ground of writing something like custom HQL that returns an object(s) of interest.

Again, there is a huge amount of error-prone boilerplate that is avoided simply by doing that, the next time you add a column you don't have to chase down 27 different hand-coded functions manually populating one field at a time.




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

Search: