From c06b724a00236b086a5a64510d8bf11978f083f8 Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Sat, 6 Oct 2012 07:02:11 -0400 Subject: [1.4.X] Fixed #17435 - Clarified that QuerySet.update returns the number of rows matched Backport of 6d46c740d8 from master --- docs/ref/models/querysets.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'docs/ref') diff --git a/docs/ref/models/querysets.txt b/docs/ref/models/querysets.txt index 3db490725e..da0e3e66ce 100644 --- a/docs/ref/models/querysets.txt +++ b/docs/ref/models/querysets.txt @@ -1530,7 +1530,8 @@ update .. method:: update(**kwargs) Performs an SQL update query for the specified fields, and returns -the number of rows affected. +the number of rows matched (which may not be equal to the number of rows +updated if some rows already have the new value). For example, to turn comments off for all blog entries published in 2010, you could do this:: -- cgit v1.3