4 ms·
False dichotomy, you can use both together and get the benefits of both an ORM and raw sql, each when they're the better choice.
by gnaritas 10y ago
False dichotomy, you can use both together and get the benefits of both an ORM and raw sql, each when they're the better choice.
- deleted 10y ago[deleted]
- AndreyErmakov 10y agoCertainly. Yet there's been a tendency later to declare SQL wrong and deprecated and to incite everyone to forget about it and go with an ORM as the only way. I do not accept that. The stronger the ORM zealots are pushing the more repulsive the idea of an ORM becomes to me. But of course it's just another instrument that has its place among the others.
- gnaritas 10y agoOnly among the inexperienced. Skilled people use both as needed, even at the same time. You can keep the complex SQL in a view and map the view with the ORM. ORM's are far too valuable to ever hand write all that SQL and SQL is far too flexible to ever ORM 100% of every use case, the ORM should make up most of the program with hand written SQL sprinkled in where useful when the ORM is clunky.