3 ms·
I think the point is, Active Record (like any orm) is a leaky abstraction that covers a small, but common percentage of what you can do with SQL. Any time I've
by ryanbrunner 9y ago
I think the point is, Active Record (like any orm) is a leaky abstraction that covers a small, but common percentage of what you can do with SQL. Any time I've run into problems fighting the "magic" of Active Record, my time was almost always better spent just taking back to hand written SQL (which isn't terrifically difficult with Rails).
Rails absolutely is a framework where you need to abandon some control and trust the framework though. If you need to know exactly how your abstractions work under the hood, it's a poor choice IMO. I doubt there a single person who has comprehensive knowledge of how every single part of Rails works.
- rapind 9y agoCouldn't agree more. Invest a bit of your time gradually learning more SQL and your life will be easier no matter the backend / ORM. SQL is really not going away anytime soon (it's demise has been falsely predicted many many times). It even fits the current language hype in that it's functional!
- danmaz74 9y agoYou nailed it :) I love AR, but there are use cases where you just need to create or optimize your queries manually.