3 ms·
To be sincere, I find Django's ORM is one of the weakest ones (e.g., the API doesn't support a simple GROUP BY). If you want to make a good case for ORMs, Djang
by hcarvalhoalves 12y ago
To be sincere, I find Django's ORM is one of the weakest ones (e.g., the API doesn't support a simple GROUP BY). If you want to make a good case for ORMs, Django's may not be a very strong argument.
In about 5 years working with Django the ORM has been the only component that consistently gave headaches. I have filled a couple bug reports about it generating non-sense/slow queries too (like generating queries with `DISTINCT` for no reason, with no way to override).
- Grue3 12y ago>the API doesn't support a simple GROUP BY This is just plain wrong (see aggregate/annotate).
- hcarvalhoalves 12y agoLet's word it differently: the API doesn't support a simple way to emit an arbitrary GROUP BY clause. The aggregate/annotate APIs do not cover all legitimate uses of GROUP BY besides very simple cases (sum, avg, etc).