1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

[1.8.x] Fixed #14483 -- Allowed using subqueries with GIS lookups

Backport of a0b5f15ea5 from master.
This commit is contained in:
Claude Paroz
2015-01-17 00:17:54 +01:00
parent 7060ef7158
commit c77dd64402
5 changed files with 26 additions and 4 deletions

View File

@@ -466,7 +466,7 @@ class SQLCompiler(object):
if obj.low_mark == 0 and obj.high_mark is None and not self.query.distinct_fields:
# If there is no slicing in use, then we can safely drop all ordering
obj.clear_ordering(True)
return obj.get_compiler(connection=self.connection).as_sql()
return obj.get_compiler(connection=self.connection).as_sql(subquery=True)
def get_default_columns(self, start_alias=None, opts=None, from_parent=None):
"""