summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql/compiler.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy/sql/compiler.py')
-rw-r--r--lib/sqlalchemy/sql/compiler.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/sqlalchemy/sql/compiler.py b/lib/sqlalchemy/sql/compiler.py
index af0fff826..4349c97f4 100644
--- a/lib/sqlalchemy/sql/compiler.py
+++ b/lib/sqlalchemy/sql/compiler.py
@@ -512,7 +512,7 @@ class SQLCompiler(Compiled):
selectable = self.stack[-1]['selectable']
try:
- col = selectable._inner_column_dict[element.text]
+ col = selectable._label_resolve_dict[element.text]
except KeyError:
# treat it like text()
util.warn_limited(
@@ -701,6 +701,10 @@ class SQLCompiler(Compiled):
# here; we can only add a label in the ORDER BY for an individual
# label expression in the columns clause.
+ # TODO: we should see if we can bring _resolve_label
+ # into this
+
+
raw_col = set(l._order_by_label_element.name
for l in order_by_select._raw_columns
if l._order_by_label_element is not None)