[Django] #25244: Not working query_set.query.group_by = [..] in v1.8

11 views
Skip to first unread message

Django

unread,
Aug 7, 2015, 5:31:22 AM8/7/15
to django-...@googlegroups.com
#25244: Not working query_set.query.group_by = [..] in v1.8
----------------------------------------------+--------------------
Reporter: Elec | Owner: nobody
Type: Uncategorized | Status: new
Component: Database layer (models, ORM) | Version: 1.8
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
----------------------------------------------+--------------------
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?

--
Ticket URL: <https://code.djangoproject.com/ticket/25244>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Aug 7, 2015, 9:52:09 AM8/7/15
to django-...@googlegroups.com
#25244: Not working query_set.query.group_by = [..] in v1.8
-------------------------------------+-------------------------------------
Reporter: Elec | Owner: nobody
Type: Uncategorized | Status: closed
Component: Database layer | Version: 1.8
(models, ORM) |
Severity: Normal | Resolution: invalid
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by aaugustin):

* status: new => closed
* needs_better_patch: => 0
* resolution: => invalid
* needs_tests: => 0
* needs_docs: => 0


Comment:

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.

--
Ticket URL: <https://code.djangoproject.com/ticket/25244#comment:1>

Reply all
Reply to author
Forward
0 new messages