diff options
| author | Tim Graham <timograham@gmail.com> | 2012-10-06 07:02:11 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2012-10-06 07:03:20 -0400 |
| commit | 6d46c740d80b0c7f75064bc6bb4d99b15b106ba4 (patch) | |
| tree | a1a16ff38081566c4b3dc74550d80275171f6ae2 /docs/ref | |
| parent | cc337a74f1808b216fff96f1695d8b066d2636f6 (diff) | |
Fixed #17435 - Clarified that QuerySet.update returns the number of rows matched
Diffstat (limited to 'docs/ref')
| -rw-r--r-- | docs/ref/models/querysets.txt | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/docs/ref/models/querysets.txt b/docs/ref/models/querysets.txt index f9dbb76ea0..858371978a 100644 --- a/docs/ref/models/querysets.txt +++ b/docs/ref/models/querysets.txt @@ -1564,7 +1564,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:: |
