3 ms·
I've worked with ORMs that make it difficult to write specific kinds of queries, and that's usually because the ORM is designed to be robust enough. However, e
by Osiris 14y ago
I've worked with ORMs that make it difficult to write specific kinds of queries, and that's usually because the ORM is designed to be robust enough. However, even that ORM would allow you manually write a query and then run it and it would convert the results back into lovely packaged objects to pass around and work on.
In a language like PHP there's a lot of annoying boilerplate you have to write around every query you run by hand like looping over the result set that an ORM can just convert into a pretty little associative array for you with a consistent structure.
As far as I'm aware, any ORM allows for hand-written queries, so if the argument is that ORM-generated queries are too bloated/slow, you can still write optimized queries where needed and still take advantage of the automatically conversion of the result set to a useful object.