#9186: Trying to get distinct values when model has a default sort order only 
ends
in tears
---------------------------+------------------------------------------------
 Reporter:  forest         |       Owner:  nobody    
   Status:  new            |   Milestone:            
Component:  Uncategorized  |     Version:  1.0       
 Keywords:                 |       Stage:  Unreviewed
Has_patch:  0              |  
---------------------------+------------------------------------------------
 This used to do what I'd expect:

 {{{
 PbxRecord.objects.values('extension').distinct()
 }}}

 But now it returns way too many values, because it generates this query:

 {{{
 SELECT DISTINCT `datastore_pbxrecord`.`extension`,
 `datastore_pbxrecord`.`id` FROM `datastore_pbxrecord` ORDER BY
 `datastore_pbxrecord`.`id` ASC
 }}}

 This is because the default ordering on the model is by id.  I assume this
 broke with the merge of queryset refactor, although I don't know that for
 sure.  I'm currently running on 1.0 beta 2.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/9186>
Django <http://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 post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to