#10847: `QuerySet.values` doesn't remove extra selections. ---------------------------------------------------+------------------------ Reporter: mrmachine | Owner: nobody Status: new | Milestone: 1.1 Component: Database layer (models, ORM) | Version: SVN Resolution: | Keywords: queryset extra select values sql Stage: Accepted | Has_patch: 1 Needs_docs: 0 | Needs_tests: 0 Needs_better_patch: 1 | ---------------------------------------------------+------------------------ Comment (by mtredinnick):
This second patch can't be correct, since calling `trim_extra_select()` isn't something to do when creating the queryset. A subsequent `values()` call could reuse those extra values, except they've now been trimmed away, which would break the queryset. As a general rule, don't throw away data from inside `Query` (in fact, `trim_extra_select()` is badly implemented for that reason; I haven't gotten around to doing it a different way and this has reminded me to get back to that in the 1.2 timeframe). -- Ticket URL: <http://code.djangoproject.com/ticket/10847#comment:6> Django <http://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 post to this group, send email to django-updates@googlegroups.com To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-updates?hl=en -~----------~----~----~----~------~----~------~--~---