#30572: Composed queries cannot change the list of columns with
values()/values_list().
-------------------------------------+-------------------------------------
Reporter: felixxm | Owner: felixxm
Type: Bug | Status: assigned
Component: Database | Version: master
layer (models, ORM) |
Severity: Normal | Keywords:
Triage Stage: Accepted | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
Composed queries cannot change the list of columns when
`values()/values_list()` is evaluated multiple times, e.g.
{{{
>>> ReservedName.objects.create(name='a', order=2)
>>> qs1 = ReservedName.objects.all()
>>> print(qs1.union(qs1).values_list('name', 'order').get())
('a', 2)
>>> print(qs1.union(qs1).values_list('order').get())
('a', 2)
}}}
(see
[https://github.com/django/django/blob/6e8303d49ba55e7393c7ef5553b240ae0d2f0c00/django/db/models/sql/compiler.py#L428-L433
compiler.py#L428-L433]).
--
Ticket URL: <https://code.djangoproject.com/ticket/30572>
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/050.7792524c74143f2b2532a2dbcabec025%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.