#23854: Add custom SelectRelated classes
-------------------------------------+-------------------------------------
Reporter: akaariai | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: master
(models, ORM) | Resolution:
Severity: Normal | Triage Stage: Accepted
Keywords: | Needs documentation: 0
Has patch: 0 | Patch needs improvement: 0
Needs tests: 0 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Comment (by akaariai):
The problem with using annotate() is that is is used to annotate a single
value to the model, and in addition annotate works only for the main model
of the query, that is you can't annotate on some already select_related()
model. While this can be a bit limiting in some cases (say, two "latest
related" annotations in a row), it isn't that big of a problem.
Another solution is a new method, for example annotate_related().
The good thing about this is that there is still plenty of time to discuss
the API before the ORM can actually support "latest related" queries :)
--
Ticket URL: <https://code.djangoproject.com/ticket/23854#comment:3>
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.8216db97baf2509e36e97f5db2ade6e7%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.