#19544: IntegrityError during ManyToMany add() on Oracle or for user-defined
through relationships.
-------------------------------------+-------------------------------------
Reporter: German M. Bravo | Owner: Simon
Type: | Charette
Cleanup/optimization | Status: assigned
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Simon Charette):
* version: 1.4 => master
Comment:
Tim, the issue still remains on Oracle since it doesn't support
`bulk_create(ignore_conflicts=True)`.
Also, now that `add(through_defaults)` support was added the optimization
cannot be used for these cases for the reasons detailed in comment:20.
I'll add to this comment that `get_or_create` cannot be used to work
around the issue unless it's adapted not to send `pre_save`/`post_save`
signal somehow.
To summarize the issue is still present on Oracle or on all backends when
using `add` on a relationship defined through a user defined
`ManyToMany(through)`. I think we should favor renaming this ticket
instead of opening a new one since it contains a great discussion about
the reasoning behind the changes.
I went ahead and did just that but feel free to revert my change or adjust
the title to be more appropriate. Thanks!
--
Ticket URL: <https://code.djangoproject.com/ticket/19544#comment:27>
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/064.6b88c527c66d65089233b893d5455b23%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.