Changes between Version 1 and Version 2 of Ticket #28514, comment 6
- Timestamp:
- Nov 6, 2017, 11:40:17 PM (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #28514, comment 6
v1 v2 20 20 * First try bulk_insert, if it does not throw exception, send m2m_changed signal. 21 21 * Either update the documentation of .add() accordingly (if it throws IntegrityError, the caller shall retry the operation), or make .add() do the retries internally. 22 * Once bulk_create(... on_conflict='ignore') [ #28668] is implemented, revert the previous step, pass on_conflict='ignore' to bulk_create, and:22 * Once bulk_create(... on_conflict='ignore') [https://code.djangoproject.com/ticket/28668 #28668] is implemented, revert the previous step, pass on_conflict='ignore' to bulk_create, and: 23 23 * In case of Postgresql retrieve information from bulk_create which objects were actually inserted, and send only for them m2m_changed 24 24 * For other databases, either send signal for all objects, even those which were in the database, don't use bulk_create or throw IntegrityError