#34123: Ambiguous aliases in ordering on combined queries with select_related().
-------------------------------------+-------------------------------------
Reporter: Shai Berger | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: dev
(models, ORM) |
Severity: Release blocker | Resolution:
Keywords: select_related | 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):
David, I'd appreciate if you could have a look.
I'm pretty convinced the solution lies in using `with_col_aliases=True`
and as long as the ordering clause is adjusted to refer to the column
alias of the left-most query (the one combining the others) then it should
work.
From some initial testing it might require a bit of adjustments in
`SQLCompiler.get_order_by` as well.
--
Ticket URL: <https://code.djangoproject.com/ticket/34123#comment:5>
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 view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/010701841aa00ef8-1f7972cb-c563-4fca-9eb8-ec98db13eeaf-000000%40eu-central-1.amazonses.com.