diff options
| author | Adam Johnson <me@adamj.eu> | 2025-04-14 15:12:28 +0100 |
|---|---|---|
| committer | Jacob Walls <jacobtylerwalls@gmail.com> | 2025-10-16 14:52:22 -0400 |
| commit | 6dc9b04018032dccbb5ad8347f7ddf4341316166 (patch) | |
| tree | da87f218b3992788d5804c552edffd270c030b7a /docs | |
| parent | 821619aa8771ef211c4c4922001efdf914201ca3 (diff) | |
Refs #28586 -- Copied fetch modes to related objects.
This change ensures that behavior and performance remain consistent when
traversing relationships.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/topics/db/fetch-modes.txt | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/docs/topics/db/fetch-modes.txt b/docs/topics/db/fetch-modes.txt index e76bb28a59..da7a07a0d4 100644 --- a/docs/topics/db/fetch-modes.txt +++ b/docs/topics/db/fetch-modes.txt @@ -29,6 +29,11 @@ Fetch modes apply to: * Fields deferred with :meth:`.QuerySet.defer` or :meth:`.QuerySet.only` * :ref:`generic-relations` +Django copies the fetch mode of an instance to any related objects it fetches, +so the mode applies to a whole tree of relationships, not just the top-level +model in the initial ``QuerySet``. This copying is also done in related +managers, even though fetch modes don't affect such managers' queries. + Available modes =============== |
