8000 Fixed #21343 -- Noted many-to-many restrictions with intermediate model. · alex-python/django@a6e3fb8 · GitHub
[go: up one dir, main page]

Skip to content

Commit a6e3fb8

Browse files
committed
Fixed #21343 -- Noted many-to-many restrictions with intermediate model.
Thanks EvilDMP for the report.
1 parent c05b2f5 commit a6e3fb8

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

docs/ref/models/relations.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,14 @@ Related objects reference
138138
.. note::
139139

140140
Note that ``add()``, ``create()``, ``remove()``, and ``clear()`` all
141-
apply database changes immediately for all types of related fields. In other
142-
words, there is no need to call ``save()`` on either end of the
141+
apply database changes immediately for all types of related fields. In
142+
other words, there is no need to call ``save()`` on either end of the
143143
relationship.
144144

145+
Also, if you are using :ref:`an intermediate model
146+
<intermediary-manytomany>` for a many-to-many relationship, some of the
147+
related manager's methods are disabled.
148+
145149
.. _direct-assignment:
146150

147151
Direct Assignment

docs/topics/db/examples/many_to_many.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@ objects, and a ``Publication`` has multiple ``Article`` objects:
3535
ordering = ('headline',)
3636

3737
What follows are examples of operations that can be performed using the Python
38-
API facilities.
38+
API facilities. Note that if you are using :ref:`an intermediate model
39+
<intermediary-manytomany>` for a many-to-many relationship, some of the related
40+
manager's methods are disabled, so some of these examples won't work with such
41+
models.
3942

4043
Create a couple of ``Publications``::
4144

0 commit comments

Comments
 (0)
0