News for hackers. Stuff that matters.
Re:OrmHate by maratd on Tuesday June 26, 2012 @10:40AM (#4162058)
> In my admittedly anecdotal experience, I have found that ORMs are the most useful for the most trivial queries.

Bingo. In other words, non-relational queries work well and relational queries don't. When I'm joining multiple tables and looking for specific rows/objects that match multiple restrictions, ORM turns into a migrane of epic proportions. SQL was specifically designed to solve that exact problem. Abstracting away from SQL will simply increase the pain factor.

Re:OrmHate by gnaritas on Tuesday June 26, 2012 @12:54PM (#4162880)
> When I'm joining multiple tables and looking for specific rows/objects that match multiple restrictions, ORM turns into a migrane of epic proportions.

Perhaps you're doing it wrong. Put the complex query in a proc or view, and use the ORM to map the result set into memory. Using an ORM doesn't mean not using SQL when it works better.

Re:OrmHate by y0ghur7_xxx on Tuesday June 26, 2012 @03:48PM (#4163790)
>> When I'm joining multiple tables and looking for specific

>> rows/objects that match multiple restrictions, ORM turns into a

>> migrane of epic proportions.

>

> Perhaps you're doing it wrong. Put the complex query in a proc or

> view, and use the ORM to map the result set into memory. Using an ORM

> doesn't mean not using SQL when it works better.

that's what he sad: use sql when it works better. if you put it in a proc, a view or your application makes no difference.