diff options
| author | Jon Dufresne <jon.dufresne@gmail.com> | 2018-01-30 07:43:53 -0800 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2018-01-30 10:43:53 -0500 |
| commit | 136bf5c2142ae3261669d02e2dd050c3141f7f2f (patch) | |
| tree | 81781bf9c8401ca911cfd5037c2786137bc13459 /docs | |
| parent | 46b3e3ffdc25b5a42762df20e536401fc512c5f3 (diff) | |
Fixed #29076 -- Made Model.refresh_from_db() clear cached relationships even if the related id doesn't change.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/models/instances.txt | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/docs/ref/models/instances.txt b/docs/ref/models/instances.txt index c327b0e9e7..73bbeb8f31 100644 --- a/docs/ref/models/instances.txt +++ b/docs/ref/models/instances.txt @@ -137,12 +137,7 @@ following is done: 1. All non-deferred fields of the model are updated to the values currently present in the database. -2. The previously loaded related instances for which the relation's value is no - longer valid are removed from the reloaded instance. For example, if you have - a foreign key from the reloaded instance to another model with name - ``Author``, then if ``obj.author_id != obj.author.id``, ``obj.author`` will - be thrown away, and when next accessed it will be reloaded with the value of - ``obj.author_id``. +2. Any cached relations are cleared from the reloaded instance. Only fields of the model are reloaded from the database. Other database-dependent values such as annotations aren't reloaded. Any |
