#34791: Prefetch's queryset attribute is ignored when the same nested relation
is
used multiple times.
-------------------------------------+-------------------------------------
Reporter: Maxime Toussaint | Owner: Maxime
| Toussaint
Type: Bug | Status: closed
Component: Database layer | Version: 4.2
(models, ORM) |
Severity: Normal | Resolution: fixed
Keywords: prefetch, | Triage Stage: Ready for
prefetch_related | checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak <felisiak.mariusz@…>):
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"254df3a3bbc2f4df51f9e2070ab2e214553f67d0" 254df3a]:
{{{
#!CommitTicketReference repository=""
revision="254df3a3bbc2f4df51f9e2070ab2e214553f67d0"
Fixed #34791 -- Fixed incorrect Prefetch()'s cache for singly related
objects.
Changed the cache name used for singly related objects to be the
to_attr parameter passed to a Prefetch object. This fixes issues with
checking if values have already been fetched in cases where the Field
already has some prefetched value, but not for the same model attr.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/34791#comment:14>
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/0107018a6f8310de-d827fbde-e69e-44b7-a86b-1108593d5291-000000%40eu-central-1.amazonses.com.