﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
24174	Extra order by ignores descending orderings	Bertrand Bordage	Josh Smeaton	"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])"	Bug	closed	Database layer (models, ORM)	1.8alpha1	Normal	fixed			Ready for checkin	1	0	0	0	0	0
