#36116: prefetch_related() selects too many objects from a related table with a
composite primary key and hidden related name
-------------------------------------+-------------------------------------
Reporter: Jacob Walls | Owner: Simon
Type: | Charette
Cleanup/optimization | Status: closed
Component: Database layer | Version: 5.2
(models, ORM) |
Severity: Release blocker | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Sarah Boyce <42296566+sarahboyce@…>):
In [changeset:"9861e8654701bf8b95b2b533034e78058eee71b4" 9861e86]:
{{{#!CommitTicketReference repository=""
revision="9861e8654701bf8b95b2b533034e78058eee71b4"
[5.2.x] Fixed #36116 -- Optimized multi-column ForwardManyToOne
prefetching.
Rely on ColPairs and TupleIn which support a single column to be specified
to avoid special casing ForwardManyToOne.get_prefetch_querysets().
Thanks Jacob Walls for the report.
Backport of 626d77e52a3f247358514bcf51c761283968099c from main.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/36116#comment:9>
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 visit
https://groups.google.com/d/msgid/django-updates/0107019487ecdf08-45d2a314-ed0d-4d51-a03b-8f8b3520eb7f-000000%40eu-central-1.amazonses.com.