mirror of
https://github.com/django/django.git
synced 2025-08-04 10:59:45 +00:00
[2.2.x] Fixed #30326 -- Doc'd how to avoid persistence of F() assignment.
Backport of bfae195b0a
from master
This commit is contained in:
parent
896cc71901
commit
86de106864
1 changed files with 3 additions and 1 deletions
|
@ -185,7 +185,9 @@ instance and will be applied on each :meth:`~Model.save()`. For example::
|
|||
reporter.save()
|
||||
|
||||
``stories_filed`` will be updated twice in this case. If it's initially ``1``,
|
||||
the final value will be ``3``.
|
||||
the final value will be ``3``. This persistence can be avoided by reloading the
|
||||
model object after saving it, for example, by using
|
||||
:meth:`~Model.refresh_from_db()`.
|
||||
|
||||
Using ``F()`` in filters
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue