﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
5417	Add a way to update multiple records at once	Adrian Holovaty	nobody	"The Django ORM currently doesn't allow for the update of multiple records in a single statement. We can add this feature in a pretty clean and consistent way by adding a {{{QuerySet.update()}}} method:

{{{
#!python
# UPDATE place SET city='Chicago' WHERE city='chicago';
Place.objects.filter(city='chicago').update(city='Chicago')

# UPDATE contestant SET age=age+2 WHERE answer='1';
Contestant.objects.filter(answer='1').update(age=SqlClause('age+2'))
}}}

The second example introduces {{{SqlClause}}}, which would be a way of specifying clauses instead of hard-coded values. We could potentially begin using this {{{SqlClause}}} in other places, too."		closed	Database layer (models, ORM)	dev		duplicate	feature_request, qs-rf		Accepted	1	0	1	0	0	0
