#24174: Extra order by ignores descending orderings
----------------------------------------------+-----------------------
     Reporter:  BertrandBordage               |      Owner:  nobody
         Type:  Bug                           |     Status:  new
    Component:  Database layer (models, ORM)  |    Version:  1.8alpha1
     Severity:  Normal                        |   Keywords:
 Triage Stage:  Unreviewed                    |  Has patch:  0
Easy pickings:  0                             |      UI/UX:  0
----------------------------------------------+-----------------------
 Consider this simple model:

 {{{
 class Test(Model):
     name = CharField(max_length=50)
     class Meta(object):
         db_table = 'test'
 }}}

 {{{Test.objects.extra(order_by=['-name'])}}} should be converted to
 something like {{{SELECT * FROM test ORDER BY name DESC}}}, but instead it
 becomes {{{SELECT * FROM test ORDER BY name ASC}}}. The minus is ignored.

 It wasn’t happening in Django 1.6 and 1.7.

 (This issue was discovered in [https://github.com/BertrandBordage/django-
 
cachalot/blob/c578cbff8a931d8bec3c3e026c8908cb61bf71d4/cachalot/tests/read.py#L495-501
 the test suite of django-cachalot])

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

Reply via email to