Branch: refs/heads/master
  Home:   https://github.com/django/django
  Commit: f51c1f590085556abca44fd2a49618162203b2ec
      
https://github.com/django/django/commit/f51c1f590085556abca44fd2a49618162203b2ec
  Author: Loic Bistuer <[email protected]>
  Date:   2013-11-07 (Thu, 07 Nov 2013)

  Changed paths:
    M django/contrib/contenttypes/generic.py
    M django/db/models/__init__.py
    M django/db/models/fields/related.py
    M django/db/models/query.py
    M docs/ref/models/queries.txt
    M docs/ref/models/querysets.txt
    M docs/releases/1.7.txt
    M tests/prefetch_related/models.py
    M tests/prefetch_related/tests.py

  Log Message:
  -----------
  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.



-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/527b8e2b73dec_35731289d481120b7%40hookshot-fe1-pe1-prd.aws.github.net.mail.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to