django/tests/prefetch_related
Simon Charette 2598b371a9 Fixed #35677 -- Avoided non-sticky filtering of prefetched many-to-many.
The original queryset._next_is_sticky() call never had the intended effect as
no further filtering was applied internally after the pk__in lookup making it
a noop.

In order to be coherent with how related filters are applied when retrieving
objects from a related manager the effects of what calling _next_is_sticky()
prior to applying annotations and filters to the queryset provided for
prefetching are emulated by allowing the reuse of all pre-existing JOINs.

Thanks David Glenck and Thiago Bellini Ribeiro for the detailed reports and
tests.
2025-02-06 14:27:51 +01:00
..
__init__.py
models.py Fixed #35677 -- Avoided non-sticky filtering of prefetched many-to-many. 2025-02-06 14:27:51 +01:00
test_prefetch_related_objects.py Fixed #35309 -- Made prefetch clear ordering for single-valued relationships. 2024-03-20 05:26:18 +01:00
test_uuid.py
tests.py Fixed #35677 -- Avoided non-sticky filtering of prefetched many-to-many. 2025-02-06 14:27:51 +01:00