summaryrefslogtreecommitdiff
path: root/tests/queries/test_bulk_update.py
AgeCommit message (Collapse)Author
2025-06-10Refs #36419 -- Fixed BulkUpdateTests.test_json_field_sql_null() crash on Oracle.Mariusz Felisiak
Follow up to c1fa3fdd040718356e5a3b9a0fe699d73f47a940.
2025-06-06Fixed #36419 -- Ensured for_save was propagated when resolving expressions.Clifford Gama
The for_save flag wasn't properly propagated when resolving expressions, which prevented get_db_prep_save() from being called in some cases. This affected fields like JSONField where None would be saved as JSON null instead of SQL NULL. Regression in 00c690efbc0b10f67924687f24a7b30397bf47d9. Thanks to David Sanders and Simon Charette for reviews. Co-authored-by: Adam Johnson <me@adamj.eu>
2025-05-08Refs #36143 -- Tested bulk_batch_size limit for bulk_update and bulk_create.Sage Abdullah
2025-01-14Refs #36075 -- Adjusted pk_fields usage in bulk_update eligibility checks.Simon Charette
Regression in bf7b17d16d3978b2e1cee4a0f7ce8840bd1a8dc4. Thanks Sage Abdullah for the report.
2022-06-13Made QuerySet.bulk_update() raise an error when batch_size is zero.Ebram Shehata
2022-02-09Fixed #33506 -- Made QuerySet.bulk_update() perform atomic writes against ↵Simon Charette
write database. The lack of _for_write = True assignment in bulk_update prior to accessing self.db resulted in the db_for_read database being used to wrap batched UPDATEs in a transaction. Also tweaked the batch queryset creation to also ensure they are executed against the same database as the opened transaction under all circumstances. Refs #23646, #33501.
2022-02-07Refs #33476 -- Reformatted code with Black.django-bot
2022-01-27Fixed #33463 -- Fixed QuerySet.bulk_update() with F() expressions.Jörg Breitbart
2021-11-29Fixed #33322 -- Fixed loss of assigned related object when saving relation ↵Hannes Ljungberg
with bulk_update().
2021-06-29Fixed #32381 -- Made QuerySet.bulk_update() return the number of objects ↵abhiabhi94
updated. Co-authored-by: Diego Lima <diego.lima@lais.huol.ufrn.br>
2020-05-15Refs #31395 -- Relied on setUpTestData() test data isolation in various tests.Simon Charette
2020-05-08Fixed #12990, Refs #27694 -- Added JSONField model field.sage
Thanks to Adam Johnson, Carlton Gibson, Mariusz Felisiak, and Raphael Michel for mentoring this Google Summer of Code 2019 project and everyone else who helped with the patch. Special thanks to Mads Jensen, Nick Pope, and Simon Charette for extensive reviews. Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2018-11-21Fixed #29974 -- Fixed non-truthy primary key values for QuerySet.bulk_update().Tom Forbes
2018-09-18Fixed #23646 -- Added QuerySet.bulk_update() to efficiently update many models.Tom Forbes