diff options
| author | Simon Charette <charette.s@gmail.com> | 2025-01-19 21:35:50 -0500 |
|---|---|---|
| committer | Sarah Boyce <42296566+sarahboyce@users.noreply.github.com> | 2025-01-21 09:13:18 +0100 |
| commit | 9861e8654701bf8b95b2b533034e78058eee71b4 (patch) | |
| tree | f628b7164e913aed6734539358560073d5747852 /tests/foreign_object/models | |
| parent | 55afe50aca9fa5f4730a85bf0b6a4807e44c9d35 (diff) | |
[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.
Diffstat (limited to 'tests/foreign_object/models')
| -rw-r--r-- | tests/foreign_object/models/person.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/foreign_object/models/person.py b/tests/foreign_object/models/person.py index f0848e6c3e..d536ab63d7 100644 --- a/tests/foreign_object/models/person.py +++ b/tests/foreign_object/models/person.py @@ -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, ) |
