#31303 closed Bug (fixed)
Remove outdated note about symmetrical with m2m relationship from a model to itself.
Reported by: | Matheus Cunha Motta | Owned by: | Matheus Cunha Motta |
---|---|---|---|
Component: | Documentation | Version: | 3.0 |
Severity: | Release blocker | Keywords: | m2m symmetrical to self |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
The "Extra fields on many-to-many relationships" section of the documentation (link: https://docs.djangoproject.com/en/3.0/topics/db/models/#extra-fields-on-many-to-many-relationships) mentions this:
"When defining a many-to-many relationship from a model to itself, using an intermediary model, you must use symmetrical=False (see the model field reference)."
Which I believe is wrong, i.e. you can set it to symmetrical=True. According to version 3.0 release notes: "Allowed symmetrical intermediate table for self-referential ManyToManyField.". Also according to model field reference (link: https://docs.djangoproject.com/en/3.0/ref/models/fields/#django.db.models.ManyToManyField.symmetrical).
So I would suggest removing that item from the ul.
Change History (4)
comment:1 by , 5 years ago
comment:2 by , 5 years ago
Has patch: | set |
---|---|
Owner: | changed from | to
Severity: | Normal → Release blocker |
Status: | new → assigned |
Summary: | Invalid documentation regarding m2m symmetrical with intermediate table → Remove outdated note about symmetrical with m2m relationship from a model to itself. |
Triage Stage: | Unreviewed → Accepted |
Type: | Uncategorized → Bug |
Thanks. It was missed in 87b1ad6e7351464c60e751b483d9dfce3a2d3382.
If the suggestion to remove is accepted, heres a pull request: https://github.com/django/django/pull/12487