#29214: Invalid SQL generated when annotating a subquery with an outerref to an
annotated field.
-------------------------------------+-------------------------------------
Reporter: Oskar Persson | Owner: (none)
Type: Bug | Status: new
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: queryset | Triage Stage: Accepted
annotations |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by aysum1914):
Well, I came here from #32839 and believe that it better explains the
issue. I also see a 'missing FROM-clause entry for table "T5" ' error when
using an annotated field in a subquery with OuterRef which is joined
multiple times in the query and gets the name of T5. When I checked the
raw query I saw that the table joined as T5 but used in the subquery as
"T5" and then raised an error.
--
Ticket URL: <https://code.djangoproject.com/ticket/29214#comment:24>
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/0107018d70bf4c6e-26d283a0-0949-49ec-aa1e-716c7d149a41-000000%40eu-central-1.amazonses.com.