#25672: Related ManyToMany fields with custom intermediary model should not 
disable
remove method.
----------------------------------------------+----------------------------
     Reporter:  Antwan86                      |      Owner:  nobody
         Type:  Cleanup/optimization          |     Status:  new
    Component:  Database layer (models, ORM)  |    Version:  1.8
     Severity:  Normal                        |   Keywords:  manytomany
                                              |  related
 Triage Stage:  Unreviewed                    |  Has patch:  0
Easy pickings:  0                             |      UI/UX:  0
----------------------------------------------+----------------------------
 It is currently impossible to add or create related item to a many-to-many
 relationship with custom intermediary model, with reason, as the custom
 model extra fields won't be populated.
 [https://github.com/django/django/blob/1.8.5/docs/topics/db/models.txt#L508
 This is documented and explained].

 However, it is also not possible to remove related items from the
 collection, and the only reason given in the doc is : ''"The remove()
 method is disabled for similar reasons"''.

 I've try to find a justification for this though the code/docs/history but
 I couldn't and this seems unjustified for me.
 All the informations needed to remove the relation are provided if you
 just use this method e.g.
 `mysourceobject.relatedobjects.remove(targetobject)`.
 I don't see why
 
[https://github.com/django/django/blob/1.8.5/django/db/models/fields/related.py#L982
 it is disabled], and therefore would like to ask for a design change here,
 or an explanation.

--
Ticket URL: <https://code.djangoproject.com/ticket/25672>
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/051.16b244f9c5b5054cfd099c1551326b79%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to