Restrictions imposed by intermediate many-to-many relationships should be mentioned in many-to-many reference docs
|Reported by:||EvilDMP||Owned by:||nobody|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
https://docs.djangoproject.com/en/dev/topics/db/models/#extra-fields-on-many-to-many-relationships mentions that "you can’t use add, create, or assignment (i.e., beatles.members = [...]) to create relationships" when using intermediate models for many-to-many relationships with through, but https://docs.djangoproject.com/en/dev/topics/db/examples/many_to_many/ doesn't, and should.
In the middle of the https://docs.djangoproject.com/en/dev/topics/db/models/#intermediary-manytomany section, there are notes about restrictions, and this probably deserves a subheading of its own.
Change History (4)
comment:3 Changed 5 months ago by timo
- Triage Stage changed from Unreviewed to Accepted
- Type changed from Uncategorized to Cleanup/optimization