commit b192cb6623b62967e5d9ded0b4f8eb32c4a7a0e5
Author: Carlton Gibson <carlton.gibson@noumenal.es>
Date: Tue Jan 22 10:52:59 2019 +0100
Fixed #30079 -- Adjusted working of prefetch_related admonition.
diff --git a/docs/ref/models/querysets.txt b/docs/ref/models/querysets.txt
index eae7bf877a..b1dff18943 100644
a
|
b
|
database.
|
1074 | 1074 | .. note:: |
1075 | 1075 | |
1076 | 1076 | Remember that, as always with ``QuerySets``, any subsequent chained methods |
1077 | | which imply a different database query will ignore previously cached |
1078 | | results, and retrieve data using a fresh database query. So, if you write |
1079 | | the following: |
| 1077 | which return a new ``QuerySet``, normally implying a different database |
| 1078 | query, will ignore previously cached results, and retrieve data using a |
| 1079 | fresh database query. So, if you write the following: |
1080 | 1080 | |
1081 | 1081 | >>> pizzas = Pizza.objects.prefetch_related('toppings') |
1082 | 1082 | >>> [list(pizza.toppings.filter(spicy=True)) for pizza in pizzas] |