Fixed #34698 -- Made QuerySet.bulk_create() retrieve primary keys when updating conflicts.

This commit is contained in:
Thomas Chaumeny 2023-07-07 13:08:17 +02:00 committed by Mariusz Felisiak
parent b7a17b0ea0
commit 89c7454dbd
4 changed files with 47 additions and 11 deletions

View file

@ -2411,9 +2411,13 @@ On databases that support it (all except Oracle and SQLite < 3.24), setting the
SQLite, in addition to ``update_fields``, a list of ``unique_fields`` that may
be in conflict must be provided.
Enabling the ``ignore_conflicts`` or ``update_conflicts`` parameter disable
setting the primary key on each model instance (if the database normally
support it).
Enabling the ``ignore_conflicts`` parameter disables setting the primary key on
each model instance (if the database normally supports it).
.. versionchanged:: 5.0
In older versions, enabling the ``update_conflicts`` parameter prevented
setting the primary key on each model instance.
.. warning::