summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql/elements.py
diff options
context:
space:
mode:
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)