#28553: Querysets: annotate() columns are forced into a certain position which 
may
disrupt union()
-------------------------------------+-------------------------------------
     Reporter:  David Sanders        |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Database layer       |                  Version:  1.11
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Matthias Kestenholz):

 I just hit this as well. The solution (workaround) seems to be using `F()`
 and `Value()` freely and consistently for all querysets even if it doesn't
 look necessary on the surface.

 See
 
https://github.com/matthiask/feincms3-forms/commit/c112a7d613e991780f383393fd05f1c84c81a279

 (It's a bit surprising that `values_list` doesn't produce a SQL query with
 the exact same ordering of values, but after thinking about it some more
 I'm not sure if that's really a bug or just a sharp edge of the current
 implementation.)

-- 
Ticket URL: <https://code.djangoproject.com/ticket/28553#comment:6>
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070184622d080b-27765196-69d6-4767-9167-eaf6e97dbe23-000000%40eu-central-1.amazonses.com.

Reply via email to