Skip to content

Instantly share code, notes, and snippets.

@loic
Last active December 29, 2015 11:59
Show Gist options
  • Save loic/7667109 to your computer and use it in GitHub Desktop.
Save loic/7667109 to your computer and use it in GitHub Desktop.
diff --git a/docs/ref/models/relations.txt b/docs/ref/models/relations.txt
index 77f2e78..62e2294 100644
--- a/docs/ref/models/relations.txt
+++ b/docs/ref/models/relations.txt
@@ -112,13 +112,13 @@ Related objects reference
.. versionchanged 1.7::
- This method accepts a ``bulk`` argument. When ``bulk=False``,
- ``QuerySet.update()`` is replaced by multiple calls to ``Model.save()``,
- and ``QuerySet.delete()`` by multiple calls to ``Model.delete()``.
- This can be useful to ensure the model's ``save()`` and ``delete()``
- are called or if you need the :data:`~django.db.models.signals.pre_save`
- and :data:`~django.db.models.signals.post_save` signals. Note that
- ``bulk=False`` comes at the expense of performance; default is ``True``.
+ For :class:`~django.db.models.ForeignKey` objects, this method accepts
+ a ``bulk`` argument to control whether or not to perform the operation
+ in bulk with ``QuerySet.update()``. If ``bulk=False`` the
+ ``save()`` method of each individual model instance is called therefore
+ triggering the :data:`~django.db.models.signals.pre_save`
+ and :data:`~django.db.models.signals.post_save` signals. Note that this
+ comes at the expense of performance; default is ``True``.
.. method:: clear()
@timgraham
Copy link

For :class:~django.db.models.ForeignKey objects, this method accepts a bulk argument to control how to perform the operation. If True (the default), QuerySet.update() is used. If bulk=False, the save() method of each individual model instance is called instead. This triggers the :data:~django.db.models.signals.pre_save and :data:~django.db.models.signals.post_save signals and comes at the expense of performance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment