#11293: Filters on aggregates lose connector
-------------------------------------+-------------------------------------
Reporter: django@… | Owner: -
Type: Bug | Status: reopened
Component: ORM aggregation | Version: 1.4
Severity: Normal | Resolution:
Keywords: having, where, | Triage Stage: Accepted
aggregate, connector | Needs documentation: 0
Has patch: 1 | Patch needs improvement: 0
Needs tests: 0 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Comment (by anonymous):
I can confirm that commit e691d86 from
https://github.com/akaariai/django/tree/refactor_utils_tree returns the
correct result for me. But note that commit
{{{
96c2eb4 (Added pre-add_q stage to sql/query.py)
}}}
broke that again. The following is returned on 96c2eb4:
{{{
'SELECT "auth_user"."id", "auth_user"."username",
"auth_user"."first_name", "auth_user"."last_name", "auth_user"."email",
"auth_user"."password", "auth_user"."is_staff", "auth_user"."is_active",
"auth_user"."is_superuser", "auth_user"."last_login",
"auth_user"."date_joined", COUNT("auth_user_groups"."group_id") AS
"groups__count" FROM "auth_user" LEFT OUTER JOIN "auth_user_groups" ON
("auth_user"."id" = "auth_user_groups"."user_id") GROUP BY
"auth_user"."id", "auth_user"."username", "auth_user"."first_name",
"auth_user"."last_name", "auth_user"."email", "auth_user"."password",
"auth_user"."is_staff", "auth_user"."is_active",
"auth_user"."is_superuser", "auth_user"."last_login",
"auth_user"."date_joined"'
}}}
which returns '''all''' users for me. This is not surprising as it doesn't
have the "HAVING" clause and doesn't even mention "tim".
--
Ticket URL: <https://code.djangoproject.com/ticket/11293#comment:23>
Django <https://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.