#24692: QuerySet.extra(select=...) is silently dropped with aggregations -------------------------------+-------------------------------------- Reporter: jdelic | Owner: nobody Type: Uncategorized | Status: new Component: Uncategorized | Version: 1.8 Severity: Normal | Resolution: Keywords: | Triage Stage: Unreviewed Has patch: 0 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------+--------------------------------------
Comment (by jdelic): Replying to [comment:4 timgraham]: > Not that this fixes the problem, but we are trying to obsolete `.extra()` by providing better APIs for all its use cases. Do you have a use case in mind where the new expressions API doesn't suffice? If so, I think there will be more interest in working on that instead of fixing bugs with `.extra()` which seems likely to be deprecated at some point. Well, there will always be edge cases where any ORM will not work, I guess. In my case the new expressions API *would suffice*, unfortunately we run a rather big project on Django 1.6.11, migrating to 1.7... so I won't be able to use it for a while. In any case, I ran into this while trying to generate some much more complex reports from our database. As {{{.extra()}}} hasn't been deprecated yet and I was able to boil it down to such a simple failure case, I think fixing it would still be a very good idea. I feel that if {{{.extra()}}} fails silently on such a simple case, there are bound to be other "more legitimate" use-cases that will fail as well. That said, I haven't investigated Django's code itself, so this might also just be a very narrow failure mode. -- Ticket URL: <https://code.djangoproject.com/ticket/24692#comment:5> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/064.0b3283b1364922712fdaf2d3b585cdf5%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.