mirror of
https://github.com/django/django.git
synced 2025-11-07 07:15:35 +00:00
Refs #19527 -- Allowed QuerySet.bulk_create() to set the primary key of its objects.
PostgreSQL support only. Thanks Vladislav Manchev and alesasnouski for working on the patch.
This commit is contained in:
@@ -203,6 +203,11 @@ Database backends
|
||||
|
||||
* Temporal data subtraction was unified on all backends.
|
||||
|
||||
* If the database supports it, backends can set
|
||||
``DatabaseFeatures.can_return_ids_from_bulk_insert=True`` and implement
|
||||
``DatabaseOperations.fetch_returned_insert_ids()`` to set primary keys
|
||||
on objects created using ``QuerySet.bulk_create()``.
|
||||
|
||||
Email
|
||||
~~~~~
|
||||
|
||||
@@ -315,6 +320,9 @@ Models
|
||||
* The :func:`~django.db.models.prefetch_related_objects` function is now a
|
||||
public API.
|
||||
|
||||
* :meth:`QuerySet.bulk_create() <django.db.models.query.QuerySet.bulk_create>`
|
||||
sets the primary key on objects when using PostgreSQL.
|
||||
|
||||
Requests and Responses
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
Reference in New Issue
Block a user