From 241da3f06ee0c6f436341cda5890b221ac453e3b Mon Sep 17 00:00:00 2001 From: Timothy McCurrach Date: Wed, 27 Jan 2021 11:25:31 +0000 Subject: [PATCH] Fixed #32388 -- Clarified QuerySet.bulk_update() caveat about duplicates for multiple batches. --- docs/ref/models/querysets.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/ref/models/querysets.txt b/docs/ref/models/querysets.txt index d09089a55e..e60e7de753 100644 --- a/docs/ref/models/querysets.txt +++ b/docs/ref/models/querysets.txt @@ -2241,7 +2241,8 @@ them, but it has a few caveats: ``batch_size``. * Updating fields defined on multi-table inheritance ancestors will incur an extra query per ancestor. -* If ``objs`` contains duplicates, only the first one is updated. +* When an individual batch contains duplicates, only the first instance in that + batch will result in an update. The ``batch_size`` parameter controls how many objects are saved in a single query. The default is to update all objects in one batch, except for SQLite