--
Ticket URL: <https://code.djangoproject.com/ticket/28624>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Comment (by Simon Charette):
Hello David, what's the purpose of disabling this constraint?
Isn't something you can achieve by defining a through model without a
`unique_together` constraint? I'm not convinced this is a scenario common
enough to warrant yet another option to `ManyToManyField`.
--
Ticket URL: <https://code.djangoproject.com/ticket/28624#comment:1>
* status: assigned => closed
* resolution: => wontfix
Comment:
I agree with Simon's assessment.
--
Ticket URL: <https://code.djangoproject.com/ticket/28624#comment:2>
* status: closed => new
* resolution: wontfix =>
Comment:
So I went along and used the through functionality for this and run into
the following issues
- i had to add a model calss with just two foreing keys which clutters up
my code
- I lost all the add create functionality which also makes the code more
complex and less understandable
so from an architectural point ov view it would be way more beautiful to
have a parameter on the field
also I do not understand why it is a set by default since I could not find
a definition for many to many which says it has to be a set, so why use a
more limiting collection?
and last but not least i think there are many usecases where a many to
many is a list for example with order and products where a product can be
many times in the same order, and that is not an out of the world scenario
--
Ticket URL: <https://code.djangoproject.com/ticket/28624#comment:3>
* status: new => closed
* resolution: => wontfix
Comment:
A list isn't appropriate because the database wouldn't preserve ordering
of many-to-many relations.
Maybe [https://pypi.python.org/pypi/django-sortedm2m django-sortedm2m]
would be appropriate for your use case.
To revisit a "wontfix" decision, see
TicketClosingReasons/DontReopenTickets.
By the way, the `add()`, `create()`, etc. limitation of using a `through`
model will be lifted when #9475 is completed.
--
Ticket URL: <https://code.djangoproject.com/ticket/28624#comment:4>