From bc9be72bdc9bb4dfc7f967ac3856115f0a6166b8 Mon Sep 17 00:00:00 2001 From: Loic Bistuer Date: Sun, 30 Mar 2014 01:57:28 +0700 Subject: Fixed transaction handling for a number of operations on related objects. Thanks Anssi and Aymeric for the reviews. Refs #21174. --- docs/releases/1.8.txt | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/releases/1.8.txt b/docs/releases/1.8.txt index 1f56c3109e..789c1db535 100644 --- a/docs/releases/1.8.txt +++ b/docs/releases/1.8.txt @@ -168,7 +168,19 @@ Backwards incompatible changes in 1.8 deprecation timeline for a given feature, its removal may appear as a backwards incompatible change. -... +* Some operations on related objects such as + :meth:`~django.db.models.fields.related.RelatedManager.add()` or + :ref:`direct assignment` ran multiple data modifying + queries without wrapping them in transactions. To reduce the risk of data + corruption, all data modifying methods that affect multiple related objects + (i.e. ``add()``, ``remove()``, ``clear()``, and + :ref:`direct assignment`) now perform their data modifying + queries from within a transaction, provided your database supports + transactions. + + This has one backwards incompatible side effect, signal handlers triggered + from these methods are now executed within the method's transaction and + any exception in a signal handler will prevent the whole operation. Miscellaneous ~~~~~~~~~~~~~ -- cgit v1.3