mirror of
https://github.com/django/django.git
synced 2025-04-12 11:32:20 +00:00
[1.10.x] Fixed #27048 -- Documented that refresh_from_db() doesn't reload @cached_properties.
Backport of 9556005425ca3d1c8c2a0e8b48e228e63a0bdd32 from master
This commit is contained in:
parent
f8307c4b8c
commit
eea74edc70
@ -155,8 +155,10 @@ following is done:
|
||||
be thrown away, and when next accessed it will be reloaded with the value of
|
||||
``obj.author_id``.
|
||||
|
||||
Note that only fields of the model are reloaded from the database. Other
|
||||
database dependent values such as annotations are not reloaded.
|
||||
Only fields of the model are reloaded from the database. Other
|
||||
database-dependent values such as annotations aren't reloaded. Any
|
||||
:func:`@cached_property <django.utils.functional.cached_property>` attributes
|
||||
aren't cleared either.
|
||||
|
||||
The reloading happens from the database the instance was loaded from, or from
|
||||
the default database if the instance wasn't loaded from the database. The
|
||||
|
Loading…
x
Reference in New Issue
Block a user