diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2016-01-26 17:28:40 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2016-01-26 17:28:40 -0500 |
commit | 5742e321b261c0c1303835b80418cd3cdc1b5643 (patch) | |
tree | ce59b6fe83907c416de19ca8764731e134434db9 /lib/sqlalchemy/sql/base.py | |
parent | 8163de4cc9e01460d3476b9fb3ed14a5b3e70bae (diff) | |
download | sqlalchemy-5742e321b261c0c1303835b80418cd3cdc1b5643.tar.gz |
- unfortunately we need to match within join where col.key does not match
what's given so we need to use a set() here. contains_column is not within
any performance paths
Diffstat (limited to 'lib/sqlalchemy/sql/base.py')
-rw-r--r-- | lib/sqlalchemy/sql/base.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/sqlalchemy/sql/base.py b/lib/sqlalchemy/sql/base.py index 48b9a8a2b..97fb04dd9 100644 --- a/lib/sqlalchemy/sql/base.py +++ b/lib/sqlalchemy/sql/base.py @@ -579,8 +579,7 @@ class ColumnCollection(util.OrderedProperties): object.__setattr__(self, '_all_columns', state['_all_columns']) def contains_column(self, col): - existing = self._data.get(col.key) - return existing is not None and hash(existing) == hash(col) + return col in set(self._all_columns) def as_immutable(self): return ImmutableColumnCollection(self._data, self._all_columns) |