Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Only with ActiveRecord pattern you need such kind of hacks to prevent, it's why it's flaw.


`includes` is not a hack. Clearly you prefer implicit over explicit when it comes to SQL generation. That's your prerogative, but I strongly disagree. I don't want the ORM trying be clever on me because it is opaque and complex. I want it to use the function arguments to construct a query, and nothing else. Debugging long-running queries is already complex enough without "clever" code trying to abstract it all away from me. Some things should not be abstracted way. It feels nice when your database is small, but it cuts hard when you start to scale.


No u need includes because when u do a.b.c u forgot to includes. It is the api problem for letting u chaining the related objects without including it.


Hibernate has `JOIN FETCH()`, Django has `select_related()`, Entity has `Include()` and so on ...




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

Search: