#14030: Use F() objects in aggregates(), annotates() and values()
-------------------------------------+-------------------------------------
Reporter: delfick | Owner: smeatonj
Type: New feature | Status: assigned
Component: Database layer | Version: master
(models, ORM) | Resolution:
Severity: Normal | Triage Stage: Accepted
Keywords: aggregate, annotate | Needs documentation: 0
Has patch: 1 | Patch needs improvement: 1
Needs tests: 0 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Comment (by smeatonj):
I implemented a fix and a test that should solve the column alignment
issue. Still unsure if this should be part of a separate patch or not, but
the specific commit is:
https://github.com/jarshwah/django/commit/330ef1213dfee5c92128d764722b9c75b43e9a5b
If someone a little more knowledgable than me can check this out and
validate that my assumptions are correct, that'd be great. Annotations and
aggregates now include their output_field in the list of fields, so
there's an opportunity for backends implementing resolve_columns to parse
annotations. I don't think this was such a big deal before as aggregates
focused on a limited set of model fields - but annotations can deal with
all model field types.
--
Ticket URL: <https://code.djangoproject.com/ticket/14030#comment:48>
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/065.a2276de091d37aa2dfdb99f6137d2022%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.