summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql/elements.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2014-02-05 19:25:13 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2014-02-05 19:25:13 -0500
commit5c188f6c1ce85eaace27f052bfd1a14f74f6a659 (patch)
tree0f703326bc1ee1e73d2e175b0877ba07592eb27a /lib/sqlalchemy/sql/elements.py
parentc5dccd82dabffa1b01d1e2852c96684b559528c2 (diff)
downloadsqlalchemy-5c188f6c1ce85eaace27f052bfd1a14f74f6a659.tar.gz
- More issues with [ticket:2932] first resolved in 0.9.2 where
using a column key of the form ``<tablename>_<columnname>`` 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]
Diffstat (limited to 'lib/sqlalchemy/sql/elements.py')
-rw-r--r--lib/sqlalchemy/sql/elements.py4
1 files changed, 2 insertions, 2 deletions
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)