Commit 5f9dbef4 authored by Adrian Holovaty's avatar Adrian Holovaty
Browse files

Fixed #17335 -- Added supports_select_related hook for django-nonrel. Thanks, jonash

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17170 bcc190cf-cafb-0310-a4f2-bffc1f526a37
parent 33bb3cd4
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -313,6 +313,8 @@ class BaseDatabaseFeatures(object):
    has_select_for_update = False
    has_select_for_update_nowait = False

    supports_select_related = True

    # Does the default test database allow multiple connections?
    # Usually an indication that the test database is in-memory
    test_db_allows_multiple_connections = True
+3 −1
Original line number Diff line number Diff line
@@ -232,6 +232,8 @@ class QuerySet(object):
        An iterator over the results from applying this QuerySet to the
        database.
        """
        fill_cache = False
        if connections[self.db].features.supports_select_related:
            fill_cache = self.query.select_related
        if isinstance(fill_cache, dict):
            requested = fill_cache