#28781: Order of queryset.union() with queryset.values() is incorrect
-------------------------------------+-------------------------------------
     Reporter:  Amir Aziiev          |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Database layer       |                  Version:  1.11
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:  union, values        |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Amir Aziiev):

 Replying to [comment:4 Hrishikesh Barman]:
 > Expected SQL and Must be SQL are ambiguous to me, did I miss something?
 also, can you elaborate more on the issue why order(2) should work, If
 it's a valid bug I'd like to work on it. I am very new to django
 contributions.

 {{{ ... (SELECT "mymodel"." id" (1), "mymodel"."col1" (2),
 "mymodel"."col2"(3), "mymodel"."col3" (4) FROM "mymodel") ... }}}

 We want to sort by 'col1' (2). But in Expected SQL ordering by 'col2' (3)

-- 
Ticket URL: <https://code.djangoproject.com/ticket/28781#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/065.f9e17ab798c8e46fff5d315ffa0c991e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to