diff options
Diffstat (limited to 'lib/sqlalchemy/dialects/oracle/base.py')
-rw-r--r-- | lib/sqlalchemy/dialects/oracle/base.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/sqlalchemy/dialects/oracle/base.py b/lib/sqlalchemy/dialects/oracle/base.py index 33f9c8659..842730c5b 100644 --- a/lib/sqlalchemy/dialects/oracle/base.py +++ b/lib/sqlalchemy/dialects/oracle/base.py @@ -886,7 +886,8 @@ class OracleCompiler(compiler.SQLCompiler): [ c for c in inner_subquery.c - if orig_select.corresponding_column(c) is not None + if orig_select.selected_columns.corresponding_column(c) + is not None ] ) if ( @@ -939,17 +940,22 @@ class OracleCompiler(compiler.SQLCompiler): limitselect._is_wrapper = True if for_update is not None and for_update.of: - + limitselect_cols = limitselect.selected_columns for elem in for_update.of: - if limitselect.corresponding_column(elem) is None: + if ( + limitselect_cols.corresponding_column(elem) + is None + ): limitselect = limitselect.column(elem) limit_subquery = limitselect.alias() + origselect_cols = orig_select.selected_columns offsetselect = sql.select( [ c for c in limit_subquery.c - if orig_select.corresponding_column(c) is not None + if origselect_cols.corresponding_column(c) + is not None ] ) |