From 5c188f6c1ce85eaace27f052bfd1a14f74f6a659 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Wed, 5 Feb 2014 19:25:13 -0500 Subject: - More issues with [ticket:2932] first resolved in 0.9.2 where using a column key of the form ``_`` matching that of an aliased column in the text would still not match at the ORM level, which is ultimately due to a core column-matching issue. Additional rules have been added so that the column ``_label`` is taken into account when working with a :class:`.TextAsFrom` construct or with literal columns. [ticket:2932] --- lib/sqlalchemy/sql/elements.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/sqlalchemy/sql') diff --git a/lib/sqlalchemy/sql/elements.py b/lib/sqlalchemy/sql/elements.py index cca03851f..2846b3b51 100644 --- a/lib/sqlalchemy/sql/elements.py +++ b/lib/sqlalchemy/sql/elements.py @@ -2927,8 +2927,8 @@ class ColumnClause(Immutable, ColumnElement): other.table is None or other.table._textual) ): - return super(ColumnClause, self).\ - _compare_name_for_result(other) + return (hasattr(other, 'name') and self.name == other.name) or \ + (hasattr(other, '_label') and self._label == other._label) else: return other.proxy_set.intersection(self.proxy_set) -- cgit v1.2.1