From 9eafb43c0ff761fa43425d329d281bb8fbece80e Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Wed, 3 Sep 2008 16:53:05 +0000 Subject: - limit/offset no longer uses ROW NUMBER OVER to limit rows, and instead uses subqueries in conjunction with a special Oracle optimization comment. Allows LIMIT/OFFSET to work in conjunction with DISTINCT. [ticket:536] --- lib/sqlalchemy/sql/compiler.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/sqlalchemy/sql/compiler.py') diff --git a/lib/sqlalchemy/sql/compiler.py b/lib/sqlalchemy/sql/compiler.py index eacbe59e1..2982a1759 100644 --- a/lib/sqlalchemy/sql/compiler.py +++ b/lib/sqlalchemy/sql/compiler.py @@ -477,7 +477,8 @@ class DefaultCompiler(engine.Compiled): if asfrom or (prev_entry and 'select' in prev_entry): stack_entry['is_subquery'] = True - if prev_entry and 'iswrapper' in prev_entry: + stack_entry['iswrapper'] = iswrapper + if not iswrapper and prev_entry and 'iswrapper' in prev_entry: column_clause_args = {'result_map':self.result_map} else: column_clause_args = {} -- cgit v1.2.1