#27719: Add queryset.alias() to mimic .annotate() for aggregations without
loading
data
-------------------------------------+-------------------------------------
Reporter: Marc Tamlyn | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: master
(models, ORM) |
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 Simon Charette):
[https://groups.google.com/d/msg/django-developers/OmAtiBbq-
EM/8ArMxdKiBQAJ There was a recent post to django-developers] where a user
was trying to use `annotate(foo=expr).defer('foo')` for this exact
purpose. Their use case was more about avoiding the double evaluation of
an `EXISTS` expression which is probably fixed on the master branch by
1ca825e4dc186da2b93292b5c848a3e5445968d7 and could be addressed by #25367
which was previously mentioned but it remains that adding annotation
support to `defer` and `only` could be another solution for this issue.
--
Ticket URL: <https://code.djangoproject.com/ticket/27719#comment:9>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/066.978bbd52b185683e0e10aa0c6b7503c1%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.