1
0
mirror of https://github.com/django/django.git synced 2024-12-23 17:46:27 +00:00
django/docs/ref/models
Loic Bistuer f51c1f5900 Fixed #17001 -- Custom querysets for prefetch_related.
This patch introduces the Prefetch object which allows customizing prefetch
operations.

This enables things like filtering prefetched relations, calling select_related
from a prefetched relation, or prefetching the same relation multiple times
with different querysets.

When a Prefetch instance specifies a to_attr argument, the result is stored
in a list rather than a QuerySet. This has the fortunate consequence of being
significantly faster. The preformance improvement is due to the fact that we
save the costly creation of a QuerySet instance.

Thanks @akaariai for the original patch and @bmispelon and @timgraham
for the reviews.
2013-11-07 14:49:49 +02:00
..
fields.txt Fixed typos in documentation. 2013-11-06 10:47:07 +01:00
index.txt Consolidated documentation for F() and Q() 2013-09-06 12:57:25 -05:00
instances.txt Consolidated documentation for F() and Q() 2013-09-06 12:57:25 -05:00
options.txt Fixed #13245: Explained Oracle's behavior w.r.t db_table 2013-10-23 14:51:22 +03:00
queries.txt Fixed #17001 -- Custom querysets for prefetch_related. 2013-11-07 14:49:49 +02:00
querysets.txt Fixed #17001 -- Custom querysets for prefetch_related. 2013-11-07 14:49:49 +02:00
relations.txt Whitespace cleanup. 2013-10-10 16:49:20 -04:00