Opened 9 years ago
Closed 9 years ago
#25244 closed Uncategorized (invalid)
Not working query_set.query.group_by = [..] in v1.8
Reported by: | Mikhail Mitrofanov | Owned by: | nobody |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | 1.8 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
I am upgrade from Django v 1.6 to v1.8. I use this code:
query_set = Rubrica.objects.filter(...).annotate(count=Count('..')).order_by('user', '-pub_date') query_set.query.group_by = ['user_id']
On Django version 1.6 this is works fine, but on version 1.8 results is not grouped by user_id
field.
How can I solve this problem?
Note:
See TracTickets
for help on using tickets.
Since
QuerySet.query.group_by
is not a public API and therefore not covered by the stability policy, this isn't a bug.Try asking for help on the django-users mailing list or the #django IRC channel instead.