Re: [Django] #10045: Improve documentation of .annotate() / .filter() ordering quirks

10 views
Skip to first unread message

Django

unread,
Jan 31, 2012, 11:11:35 PM1/31/12
to django-...@googlegroups.com
#10045: Improve documentation of .annotate() / .filter() ordering quirks
--------------------------------------+------------------------------------
Reporter: alex@… | Owner:
Type: Cleanup/optimization | Status: reopened
Component: Documentation | Version: SVN
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by anonymous):

* ui_ux: => 0
* easy: => 0


Comment:

This seems more than documenting a "quirk". The very example given in the
docs is broken.

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

Django

unread,
Jan 31, 2012, 11:22:38 PM1/31/12
to django-...@googlegroups.com
#10045: Improve documentation of .annotate() / .filter() ordering quirks
--------------------------------------+------------------------------------
Reporter: alex@… | Owner:
Type: Cleanup/optimization | Status: reopened
Component: Documentation | Version: SVN
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by SmileyChris):

(anon was me)

In the project test, I create two `Publisher`s, and assign three `Book`s
to the first publisher, two above a rating of `3.0`. Running
`Publisher.objects.annotate(num_books=Count('book')).filter(book__rating__gt=3.0)[0].num_books`
returns **6**.

--
Ticket URL: <https://code.djangoproject.com/ticket/10045#comment:6>

Django

unread,
Oct 29, 2015, 6:49:38 PM10/29/15
to django-...@googlegroups.com
#10045: Improve documentation of .annotate() / .filter() ordering quirks
--------------------------------------+------------------------------------
Reporter: alex@… | Owner:
Type: Cleanup/optimization | Status: new
Component: Documentation | Version: master

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by timgraham):

* has_patch: 0 => 1


Comment:

[https://github.com/django/django/pull/5511 PR] -- I could use some advice
from ORM experts about how to explain the actual behavior. I'm not sure if
it might be a bug that we can fix later or if we should simply say "don't
do that."

--
Ticket URL: <https://code.djangoproject.com/ticket/10045#comment:8>

Django

unread,
Nov 12, 2015, 1:22:11 PM11/12/15
to django-...@googlegroups.com
#10045: Improve documentation of .annotate() / .filter() ordering quirks
-------------------------------------+-------------------------------------
Reporter: alex@… | Owner: Tim
Type: | Graham <timograham@…>
Cleanup/optimization | Status: closed
Component: Documentation | Version: master
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: new => closed
* owner: => Tim Graham <timograham@…>
* resolution: => fixed


Comment:

In [changeset:"91a431f48c1fc5ecc9a837e8071a0062d31b490f" 91a431f4]:
{{{
#!CommitTicketReference repository=""
revision="91a431f48c1fc5ecc9a837e8071a0062d31b490f"
Fixed #10045 -- Corrected docs about .annotate()/.filter() ordering.

Thanks Josh, Anssi, and Carl for reviews and advice.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/10045#comment:9>

Django

unread,
Nov 12, 2015, 1:24:33 PM11/12/15
to django-...@googlegroups.com
#10045: Improve documentation of .annotate() / .filter() ordering quirks
-------------------------------------+-------------------------------------
Reporter: alex@… | Owner: Tim
Type: | Graham <timograham@…>
Cleanup/optimization | Status: closed
Component: Documentation | Version: master
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"16865782d7d92c863bcb62e2e91400dd8af79c5b" 16865782]:
{{{
#!CommitTicketReference repository=""
revision="16865782d7d92c863bcb62e2e91400dd8af79c5b"
[1.9.x] Fixed #10045 -- Corrected docs about .annotate()/.filter()
ordering.

Thanks Josh, Anssi, and Carl for reviews and advice.

Backport of 91a431f48c1fc5ecc9a837e8071a0062d31b490f from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/10045#comment:10>

Django

unread,
Nov 12, 2015, 1:24:34 PM11/12/15
to django-...@googlegroups.com
#10045: Improve documentation of .annotate() / .filter() ordering quirks
-------------------------------------+-------------------------------------
Reporter: alex@… | Owner: Tim
Type: | Graham <timograham@…>
Cleanup/optimization | Status: closed
Component: Documentation | Version: master
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"10d18dec10a1794f1430a7768e03d851c593f813" 10d18dec]:
{{{
#!CommitTicketReference repository=""
revision="10d18dec10a1794f1430a7768e03d851c593f813"
[1.8.x] Fixed #10045 -- Corrected docs about .annotate()/.filter()
ordering.

Thanks Josh, Anssi, and Carl for reviews and advice.

Backport of 91a431f48c1fc5ecc9a837e8071a0062d31b490f from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/10045#comment:11>

Reply all
Reply to author
Forward
0 new messages