#19195: Using distinct([*fields]) filter on a foreign key produces an ordering
error when the foreign key has a Meta ordering field.
-------------------------------------+-------------------------------------
     Reporter:  chrisedgemon@…       |                    Owner:  nobody
         Type:  Bug                  |                   Status:  closed
    Component:  Database layer       |                  Version:
  (models, ORM)                      |  1.7-beta-2
     Severity:  Release blocker      |               Resolution:  fixed
     Keywords:  distinct, query      |             Triage Stage:  Ready for
    Has patch:  1                    |  checkin
  Needs tests:  0                    |      Needs documentation:  0
Easy pickings:  0                    |  Patch needs improvement:  0
                                     |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Althalus):

 I've found an issue with Django 1.7 checks framework and this ticket.
 Now we're allowed to order by `fieldname` as before and by `fieldname_id`
 (without joins).
 But django/db/models/base.py `_check_ordering` method still does not allow
 to set `fieldname_id` as one of Meta.ordering values.
 I've made a patch here: https://github.com/Vincent-
 Vega/django/commit/7d94a3d822746f2815e7184928311e1d91dff467

 I'm quite new to contributing (and also django faq says that pull requests
 without ticket are not accepted on github).
 So it would be nice if you explain what can I do next.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/19195#comment:14>
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/080.5a331baf568be0824fd91d02ed168d52%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to