From b4a29210cfba8edace679bd0246ee397a129773d Mon Sep 17 00:00:00 2001 From: KimSia Sim <245021+simkimsia@users.noreply.github.com> Date: Wed, 22 Nov 2023 21:29:30 +0800 Subject: [PATCH] [5.0.x] Updated conditions to retrieve primary keys in bulk_create() docs. Backport of c9ce764f59c1e809b210337980ae10c4b1d0f9be from main. --- docs/ref/models/querysets.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/ref/models/querysets.txt b/docs/ref/models/querysets.txt index 13d5147e1c..6ad76908cb 100644 --- a/docs/ref/models/querysets.txt +++ b/docs/ref/models/querysets.txt @@ -2436,10 +2436,10 @@ This has a number of caveats though: * The model's ``save()`` method will not be called, and the ``pre_save`` and ``post_save`` signals will not be sent. * It does not work with child models in a multi-table inheritance scenario. -* If the model's primary key is an :class:`~django.db.models.AutoField`, the - primary key attribute can only be retrieved on certain databases (currently - PostgreSQL, MariaDB 10.5+, and SQLite 3.35+). On other databases, it will not - be set. +* If the model's primary key is an :class:`~django.db.models.AutoField` and + ``ignore_conflicts`` is False, the primary key attribute can only be + retrieved on certain databases (currently PostgreSQL, MariaDB 10.5+, and + SQLite 3.35+). On other databases, it will not be set. * It does not work with many-to-many relationships. * It casts ``objs`` to a list, which fully evaluates ``objs`` if it's a generator. The cast allows inspecting all objects so that any objects with a