diff options
| author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2008-04-15 04:52:39 +0000 |
|---|---|---|
| committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2008-04-15 04:52:39 +0000 |
| commit | c934beea01b62ae0daa3ee09f1bad3fac835b019 (patch) | |
| tree | bbf13efd8c893f54e1e7f9b2546433066c7affdb /django/db | |
| parent | 81b30438271b1dbac38ca1a2fe40f1e4dcb09293 (diff) | |
Fixed #6957 -- Removed a stray reference to QuerySet._select_related and added
a way to copy the select_related() settings from an existing queryset.
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@7425 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/db')
| -rw-r--r-- | django/db/models/query.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/django/db/models/query.py b/django/db/models/query.py index d9c2f8144b..9f9d5a6ce3 100644 --- a/django/db/models/query.py +++ b/django/db/models/query.py @@ -402,6 +402,13 @@ class _QuerySet(object): obj.query.max_depth = depth return obj + def dup_select_related(self, other): + """ + Copies the related selection status from the queryset 'other' to the + current queryset. + """ + self.query.select_related = other.query.select_related + def order_by(self, *field_names): """Returns a new QuerySet instance with the ordering changed.""" assert self.query.can_filter(), \ |
