#32983: Prevent developers from defining a related_name on symmetrical
ManyToManyFields
-------------------------------------+-------------------------------------
Reporter: | Owner: nobody
partofthething |
Type: | Status: new
Cleanup/optimization |
Component: Database | Version: 4.0
layer (models, ORM) |
Severity: Normal | Keywords:
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
In ManyToManyField, if the `symmetrical` argument is passed, or if it's a
self-referential ManyToMany relationship, the related field on the target
model is not created. However, if a developer passes in the `related_name`
not understanding this fact, they may be confused until they find the
information about symmetrical relationship. Thus, it is proposed to raise
an error when the user defines a ManyToManyField in this condition.
--
Ticket URL: <https://code.djangoproject.com/ticket/32983>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/057.11acb0a6152bf371c8a5efbbe217be0f%40djangoproject.com.