#36096: QuerySet.values() on a UNION query results in a broken query
-------------------------------------+-------------------------------------
     Reporter:  Isaac Nygaard        |                    Owner:  (none)
         Type:  Uncategorized        |                   Status:  closed
    Component:  Database layer       |                  Version:  5.0
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:  invalid
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Simon Charette):

 * cc: Simon Charette (added)
 * resolution:   => invalid
 * status:  new => closed

Comment:

 There was a significant refactor to how `values` operates with regards to
 the order of the `SELECT` clause
 [https://github.com/django/django/pull/16703/ that landed a few weeks ago
 to address issues] with `union` involving annotations (see #28900) which
 will be part of [https://code.djangoproject.com/wiki/Version5.2Roadmap the
 5.2 alpha release] schedule to be released soon.

 I suspect
 
[https://github.com/django/django/pull/16703/commits/70e8983c3be17e7532defa915ae5ce5b9ad5c1e6
 this commit will address your issue] but you've unfortunately not provided
 enough details in your report (exact models) for us to determine if it's
 the case. I suggest you test whether or not the current `main` branch
 resolves your issue (or wait for 5.2a1 to be released and test against it)
 and re-open if applicable.
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36096#comment:1>
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 view this discussion visit 
https://groups.google.com/d/msgid/django-updates/0107019463771bb0-66633448-ded9-4a44-b66b-114c20d24684-000000%40eu-central-1.amazonses.com.

Reply via email to