What is the purpose of Django's bulk_update method?
Correct answer
B. To update multiple objects in the database efficiently
17 views
B. To update multiple objects in the database efficiently
17 views
bulk_update() updates multiple objects efficiently, usually in one query: Book.objects.bulk_update(books, ["price"]), where you list the fields to write.
Like bulk_create(), it bypasses save() and signals.
Want more practice? Try the full set of Computer Science MCQs on MCQsExam.com.
Not sure why the answer is B? Ask here and get an explanation.