From: Mike Bayer Date: Tue, 26 Jan 2016 22:28:40 +0000 (-0500) Subject: - unfortunately we need to match within join where col.key does not match X-Git-Tag: rel_1_1_0b1~84^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5742e321b261c0c1303835b80418cd3cdc1b5643;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git - 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 --- diff --git a/lib/sqlalchemy/sql/base.py b/lib/sqlalchemy/sql/base.py index 48b9a8a2b0..97fb04dd92 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)