]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- unfortunately we need to match within join where col.key does not match
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 26 Jan 2016 22:28:40 +0000 (17:28 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 26 Jan 2016 22:28:40 +0000 (17:28 -0500)
what's given so we need to use a set() here.  contains_column is not within
any performance paths

lib/sqlalchemy/sql/base.py

index 48b9a8a2b0b345a95a4d2912afe59f10e0ac3832..97fb04dd92db0de8d8ba214d346aef8ed86cbacf 100644 (file)
@@ -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)