diff options
| author | Tim Graham <timograham@gmail.com> | 2016-12-31 09:04:09 -0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2017-01-17 20:52:01 -0500 |
| commit | ed251246cc6a22561217f38f7cf96598b22ff0fe (patch) | |
| tree | 6e17d1affdbf331b3f1437491ba7d9bdb677c8a0 /docs | |
| parent | e0910dcc9283cd8f782cb97836c291f6f395f3f0 (diff) | |
Refs #25550 -- Removed support for direct assignment to the reverse side of a related set.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/models/relations.txt | 23 | ||||
| -rw-r--r-- | docs/releases/2.0.txt | 3 |
2 files changed, 3 insertions, 23 deletions
diff --git a/docs/ref/models/relations.txt b/docs/ref/models/relations.txt index c34d3104b2..9cb61d14ed 100644 --- a/docs/ref/models/relations.txt +++ b/docs/ref/models/relations.txt @@ -177,26 +177,3 @@ Related objects reference .. versionchanged:: 1.11 The clearing of the prefetched cache described above was added. - -Direct Assignment -================= - -A related object set can be replaced in bulk with one operation by assigning a -new iterable of objects to it:: - - >>> new_list = [obj1, obj2, obj3] - >>> e.related_set = new_list - -If the foreign key relationship has ``null=True``, then the related manager -will first disassociate any existing objects in the related set before adding -the contents of ``new_list``. Otherwise the objects in ``new_list`` will be -added to the existing related object set. - -.. deprecated:: 1.10 - - Direct assignment is deprecated in favor of the - :meth:`~django.db.models.fields.related.RelatedManager.set` method:: - - >>> e.related_set.set([obj1, obj2, obj3]) - - This prevents confusion about an assignment resulting in an implicit save. diff --git a/docs/releases/2.0.txt b/docs/releases/2.0.txt index 4c9347d554..1d46067405 100644 --- a/docs/releases/2.0.txt +++ b/docs/releases/2.0.txt @@ -321,3 +321,6 @@ these features. ``django.template.base.Origin`` are removed. * The ``makemigrations --exit`` option is removed. + +* Support for direct assignment to a reverse foreign key or many-to-many + relation is removed. |
