From af44efe26e3f703ca1c30e79ee68428eed35abcf Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sat, 2 Feb 2013 20:06:31 -0500 Subject: Fixed a bug regarding column annotations which in particular could impact some usages of the new :func:`.orm.remote` and :func:`.orm.local` annotation functions, where annotations could be lost when the column were used in a subsequent expression. [ticket:2660] --- lib/sqlalchemy/sql/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/sqlalchemy/sql') diff --git a/lib/sqlalchemy/sql/util.py b/lib/sqlalchemy/sql/util.py index aab1ae5ba..fd138cfec 100644 --- a/lib/sqlalchemy/sql/util.py +++ b/lib/sqlalchemy/sql/util.py @@ -449,7 +449,7 @@ class Annotated(object): def _with_annotations(self, values): clone = self.__class__.__new__(self.__class__) clone.__dict__ = self.__dict__.copy() - expression.ColumnElement.comparator._reset(self) + expression.ColumnElement.comparator._reset(clone) clone._annotations = values return clone -- cgit v1.2.1