4 ms·
I don't really understand why people throw the baby out with the bathwater like that. What's the problem of using an ORM for 99% of your queries and doing the o
by StavrosK 9y ago
I don't really understand why people throw the baby out with the bathwater like that. What's the problem of using an ORM for 99% of your queries and doing the other 1% in raw SQL? Many ORMs (like Django's) even help you by mapping the results back into models automatically[1].
[1] https://docs.djangoproject.com/en/1.11/topics/db/sql/#mapping-query-fields-to-model-fields https://docs.djangoproject.com/en/1.11/topics/db/sql/#mappin...
- dpark 9y agoI use something like Dapper on one of my services. I don’t consider it “throwing the baby out with the bath water”. My experience with ORMs is that they waste far more time debugging odd behavior and working around quirks and poor generated queries than they save in coding effort. I’ve never felt that ORMs actually saves me that much effort except for the boilerplate of deserializing into objects. Everything else I feel is a net negative. Writing SQL generally isn’t that hard. For the cases where it is hard, ORM generally does a poor job anyway.
- zaptheimpaler 9y agoThe search for the holy grail continues..