#28442: Error creating queryset with nested OuterRefs on a foreign key
-------------------------------------+-------------------------------------
Reporter: Abram Booth | Owner: Oliver
| Sauder
Type: Bug | Status: closed
Component: Database layer | Version: 1.11
(models, ORM) |
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Mariusz Felisiak <felisiak.mariusz@…>):
In [changeset:"600628f8f0ab077c62223a54a6c8cde6cbbd1ed1" 600628f8]:
{{{
#!CommitTicketReference repository=""
revision="600628f8f0ab077c62223a54a6c8cde6cbbd1ed1"
Refs #28442 -- Adjusted related lookups handling of expression rhs.
Expressions should never be prepared as other Lookup.get_prep_lookup
implementations hint at by returning early on the presence of the
resolve_expression attribute.
The previous solution was only handling lookups against related fields
pointing at AutoFields and would break for foreign keys to other fields.
It was also causing bidirectional coupling between model fields and
expressions which the method level import of OuterRef was a symptom of.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/28442#comment:8>
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/064.104224b46c91580de8e2623094cb63d4%40djangoproject.com.