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

I think that "requires a tweak at the string level" is not precisely true/correct, but the overall idea is true. For any non-trivial, long-lived, application you will at least have to inspect the ORM-generated SQL string for some query and you'll have to either adjust your ORM calls (e.g., add even more magical Hibernate annotations) or use an "escape hatch" to write the query by hand.

The larger point isn't really that you can't accomplish everything with the ORM, IMO, but rather that the conventional ORM value proposition of "you don't have to write/understand SQL" is totally false. You will have to understand SQL and you will have to fiddle with your ORM to generate the SQL you want at some point. But, if you're going to end up fiddling with your ORM and inspecting the generated SQL anyway, then why not just start with something closer to the SQL in the first place?

Phrased differently, we have to learn SQL no matter what--and you won't convince me otherwise--, so why should I have to learn SQL, and Hibernate's APIs and gotchas when I do Java, and Laravel's Doctrine APIs when I do PHP, and Entity Framework when I do C#, etc, etc.




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

Search: