3 ms·
yeah, no... ORMs are A LOT more than just mashing strings together to perform a query. they are there to take care of all of the crap that you don't want or ne
by thrownaway954 6y ago
yeah, no... ORMs are A LOT more than just mashing strings together to perform a query.
they are there to take care of all of the crap that you don't want or need to worry about. for instance, parametrizing string against sql injections, handling transactions properly, concatenating joins, proper pagination and sql syntax discrepancies to name a few. and let's not to forget to mention things that go BEYOND the database interactions that are built on top of the ORM like data validations, custom properties, callbacks and so on.
there are way more benefits to using an ORM than not using one. a good ORM (like ActiveRecord) will let you break out of it and write raw sql when you need the perform boost while preventing yourself from shooting yourself in the foot.
* i've written and contributed to a couple of ORMs in my lifetime
- nojokes 6y agoCompletely agree. Knowing and understanding SQL and query optimization is necessary because ORM is not magic.