From bf934018a52b4fe4c43745f88b66210d6517338f Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Mon, 10 Feb 2014 19:17:00 -0500 Subject: - for TextAsFrom, put the "inner" columns in the result map directly. Have also considered linking column.label() to the "column" itself being in the result map but this reveals some naming collision problems (that also seem to be very poorly tested...). This should be as far as we want to go right now with [ticket:2932]. --- lib/sqlalchemy/sql/compiler.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'lib/sqlalchemy/sql/compiler.py') diff --git a/lib/sqlalchemy/sql/compiler.py b/lib/sqlalchemy/sql/compiler.py index d4b080720..d597837bd 100644 --- a/lib/sqlalchemy/sql/compiler.py +++ b/lib/sqlalchemy/sql/compiler.py @@ -616,10 +616,9 @@ class SQLCompiler(Compiled): ) if populate_result_map: - for c in taf.c: - self._add_to_result_map( - c.key, c.key, (c,), c.type - ) + for c in taf.column_args: + self.process(c, within_columns_clause=True, + add_to_result_map=self._add_to_result_map) text = self.process(taf.element, **kw) if asfrom and parens: -- cgit v1.2.1