#6422: Support for 'DISTINCT ON' queries with QuerySet.distinct()
----------------------------------------------------------------------+-----
Reporter: Manfred Wassmann <[email protected]> |
Owner: nobody
Status: new |
Milestone:
Component: Database layer (models, ORM) |
Version: SVN
Resolution: |
Keywords:
Stage: Accepted |
Has_patch: 1
Needs_docs: 1 |
Needs_tests: 1
Needs_better_patch: 1 |
----------------------------------------------------------------------+-----
Changes (by cornbread):
* cc: ikelly (removed)
* cc: cornbread (added)
Comment:
I just ran into this issue. I am trying to return unique Session keys from
a table. I tried
PageRequest.objects.order_by('session').distinct().count() and I get 217
records and not 1 that I should be getting. Would be nice to just be able
to do PageRequest.objects.all().distinct('session').count()
Looking forward to your new patch Manfred Wassmann. Thanks for the great
work!
--
Ticket URL: <http://code.djangoproject.com/ticket/6422#comment:6>
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
-~----------~----~----~----~------~----~------~--~---