summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/models/instances.txt6
-rw-r--r--docs/ref/models/querysets.txt16
2 files changed, 22 insertions, 0 deletions
diff --git a/docs/ref/models/instances.txt b/docs/ref/models/instances.txt
index 14541ad0d1..b7ae3890cf 100644
--- a/docs/ref/models/instances.txt
+++ b/docs/ref/models/instances.txt
@@ -386,6 +386,12 @@ perform an update on all fields.
Specifying ``update_fields`` will force an update.
+When saving a model fetched through deferred model loading
+(:meth:`~Model.only()` or :meth:`~Model.defer()`) only the fields loaded from
+the DB will get updated. In effect there is an automatic ``update_fields`` in
+this case. If you assign or change any deferred field value, these fields will
+be added to the updated fields.
+
Deleting objects
================
diff --git a/docs/ref/models/querysets.txt b/docs/ref/models/querysets.txt
index 8c188c67c3..b59b2ece82 100644
--- a/docs/ref/models/querysets.txt
+++ b/docs/ref/models/querysets.txt
@@ -1110,6 +1110,14 @@ one, doing so will result in an error.
reader, is slightly faster and consumes a little less memory in the Python
process.
+.. versionchanged:: 1.5
+
+.. note::
+
+ When calling :meth:`~Model.save()` for instances with deferred fields,
+ only the loaded fields will be saved. See :meth:`~Model.save()` for more
+ details.
+
only
~~~~
@@ -1154,6 +1162,14 @@ All of the cautions in the note for the :meth:`defer` documentation apply to
options. Also note that using :meth:`only` and omitting a field requested
using :meth:`select_related` is an error as well.
+.. versionchanged:: 1.5
+
+.. note::
+
+ When calling :meth:`~Model.save()` for instances with deferred fields,
+ only the loaded fields will be saved. See :meth:`~Model.save()` for more
+ details.
+
using
~~~~~