1
0
mirror of https://github.com/django/django.git synced 2024-12-22 00:55:44 +00:00
django/tests/defer_regress
Simon Charette 83f5478225 Fixed #35356 -- Deferred self-referential foreign key fields adequately.
While refs #34612 surfaced issues with reverse one-to-one fields
deferrals, it missed that switching to storing remote fields would break
self-referential relationships.

This change switches to storing related objects in the select mask
instead of remote fields to prevent collisions when dealing with
self-referential relationships that might have a different directional
mask.

Despite fixing #21204 introduced a crash under some self-referential
deferral conditions, it was simply not working even before that as it
aggregated the sets of deferred fields by model.

Thanks Joshua van Besouw for the report and Mariusz Felisiak for the
review.
2024-04-23 13:17:17 -03:00
..
__init__.py Merged regressiontests and modeltests into the test root. 2013-02-26 14:36:57 +01:00
models.py Fixed #35356 -- Deferred self-referential foreign key fields adequately. 2024-04-23 13:17:17 -03:00
tests.py Fixed #35356 -- Deferred self-referential foreign key fields adequately. 2024-04-23 13:17:17 -03:00