> 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.
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.