diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-08-28 12:41:50 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-08-28 12:41:50 -0400 |
commit | becd78503f096e74adde319b2726b052b2353921 (patch) | |
tree | 4cb1c69a5c00d2c4dbdba6b0d39702b8816f64b2 /lib/sqlalchemy/sql/annotation.py | |
parent | 685a014c644477a7e7cdb6aad4436d4422167209 (diff) | |
download | sqlalchemy-becd78503f096e74adde319b2726b052b2353921.tar.gz |
- this is small optimization, currently it's the best we can do
for #3175. fixes #3175 (for now)
Diffstat (limited to 'lib/sqlalchemy/sql/annotation.py')
-rw-r--r-- | lib/sqlalchemy/sql/annotation.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/sqlalchemy/sql/annotation.py b/lib/sqlalchemy/sql/annotation.py index 02f5c3c1c..3df4257d4 100644 --- a/lib/sqlalchemy/sql/annotation.py +++ b/lib/sqlalchemy/sql/annotation.py @@ -46,6 +46,7 @@ class Annotated(object): self.__dict__ = element.__dict__.copy() self.__element = element self._annotations = values + self._hash = hash(element) def _annotate(self, values): _values = self._annotations.copy() @@ -87,7 +88,7 @@ class Annotated(object): return self.__class__(clone, self._annotations) def __hash__(self): - return hash(self.__element) + return self._hash def __eq__(self, other): if isinstance(self.__element, operators.ColumnOperators): |