1
0
mirror of https://github.com/django/django.git synced 2025-10-24 14:16:09 +00:00

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.
This commit is contained in:
Simon Charette
2025-01-19 21:35:50 -05:00
committed by Sarah Boyce
parent 337c641abb
commit 626d77e52a
3 changed files with 51 additions and 20 deletions

View File

@@ -107,6 +107,6 @@ class Friendship(models.Model):
Person,
from_fields=["to_friend_country_id", "to_friend_id"],
to_fields=["person_country_id", "id"],
related_name="to_friend",
related_name="to_friend+",
on_delete=models.CASCADE,
)