diff options
| author | Hasan Ramezani <hasan.r67@gmail.com> | 2020-11-12 10:06:04 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-12 10:06:04 +0100 |
| commit | c448e614c60cc97c6194c62052363f4f501e0953 (patch) | |
| tree | 5a33cb66ecfedfe57297fe02ce8ba88583c3b344 /docs | |
| parent | 9a3454f6046b9b7591fd03e21cf6da0b23c57689 (diff) | |
Fixed #32187 -- Removed unnecessary select_related in queries doc.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/topics/db/queries.txt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/topics/db/queries.txt b/docs/topics/db/queries.txt index 637975bb2e..d29882e342 100644 --- a/docs/topics/db/queries.txt +++ b/docs/topics/db/queries.txt @@ -1283,7 +1283,7 @@ table. Example:: >>> b = Blog.objects.get(pk=1) # Update all the headlines belonging to this Blog. - >>> Entry.objects.select_related().filter(blog=b).update(headline='Everything is the same') + >>> Entry.objects.filter(blog=b).update(headline='Everything is the same') Be aware that the ``update()`` method is converted directly to an SQL statement. It is a bulk operation for direct updates. It doesn't run any |
