Fixed #7791 -- Fixed a really silly error I introduced in [7926]. :-(
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8052 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
0e9587fd6b
commit
83e97ecf88
|
@ -1616,6 +1616,7 @@ class Query(object):
|
||||||
if self.ordering_aliases:
|
if self.ordering_aliases:
|
||||||
result = order_modified_iter(cursor, len(self.ordering_aliases),
|
result = order_modified_iter(cursor, len(self.ordering_aliases),
|
||||||
self.connection.features.empty_fetchmany_value)
|
self.connection.features.empty_fetchmany_value)
|
||||||
|
else:
|
||||||
result = iter((lambda: cursor.fetchmany(GET_ITERATOR_CHUNK_SIZE)),
|
result = iter((lambda: cursor.fetchmany(GET_ITERATOR_CHUNK_SIZE)),
|
||||||
self.connection.features.empty_fetchmany_value)
|
self.connection.features.empty_fetchmany_value)
|
||||||
if not self.connection.features.can_use_chunked_reads:
|
if not self.connection.features.can_use_chunked_reads:
|
||||||
|
|
|
@ -822,6 +822,11 @@ Bug #7759 -- count should work with a partially read result set.
|
||||||
... break
|
... break
|
||||||
True
|
True
|
||||||
|
|
||||||
|
Bug #7791 -- there were "issues" when ordering and distinct-ing on fields
|
||||||
|
related via ForeignKeys.
|
||||||
|
>>> Note.objects.order_by('extrainfo__info').distinct()
|
||||||
|
[<Note: n3>, <Note: n1>, <Note: n2>]
|
||||||
|
|
||||||
"""}
|
"""}
|
||||||
|
|
||||||
# In Python 2.3, exceptions raised in __len__ are swallowed (Python issue
|
# In Python 2.3, exceptions raised in __len__ are swallowed (Python issue
|
||||||
|
|
Loading…
Reference in New Issue