Changes between Initial Version and Version 2 of Ticket #23662


Ignore:
Timestamp:
Oct 16, 2014, 4:04:56 AM (10 years ago)
Author:
Akis Kesoglou
Comment:

Edited bug description to properly format example code

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #23662

    • Property Component UncategorizedDatabase layer (models, ORM)
    • Property Has patch set
    • Property Type UncategorizedCleanup/optimization
    • Property UI/UX set
  • Ticket #23662 – Description

    initial v2  
    11Current implementation:
    22https://github.com/django/django/blob/master/django/db/models/query.py
     3
     4{{{
    35class QuerySet(object):
    46    ...
     
    1012        self._fetch_all()
    1113        return len(self._result_cache)
     14}}}
    1215
    1316These methods call self._fetch_all(), thus evaluating the queryset. Although, this behaviour is documented (https://docs.djangoproject.com/en/1.7/ref/models/querysets/#when-querysets-are-evaluated), it is not obvious.
Back to Top