Author: adrian Date: 2010-01-10 12:36:45 -0600 (Sun, 10 Jan 2010) New Revision: 12181
Modified: django/trunk/docs/topics/db/queries.txt Log: Fixed #12084 -- Documented the fact that QuerySet.update() returns the number of affected rows. Thanks, timo Modified: django/trunk/docs/topics/db/queries.txt =================================================================== --- django/trunk/docs/topics/db/queries.txt 2010-01-10 18:36:20 UTC (rev 12180) +++ django/trunk/docs/topics/db/queries.txt 2010-01-10 18:36:45 UTC (rev 12181) @@ -785,8 +785,8 @@ # Change every Entry so that it belongs to this Blog. >>> Entry.objects.all().update(blog=b) -The ``update()`` method is applied instantly and doesn't return anything -(similar to ``delete()``). The only restriction on the ``QuerySet`` that is +The ``update()`` method is applied instantly and returns the number of rows +affected by the query. The only restriction on the ``QuerySet`` that is updated is that it can only access one database table, the model's main table. So don't try to filter based on related fields or anything like that; it won't work.
-- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-upda...@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.