- changed status to resolved
annotations bug
Issue #2660
resolved
from sqlalchemy.sql import column
c = column('x')
c == 5
c1 = c._annotate({"x": True})
c1 == 5
c2 = c1._annotate({"y": True})
assert (c2 == 5).left._annotations == {"x": True, "y": True}
patch:
diff -r acb9ded7c87d30446c19c825aa8fd373827f1040 lib/sqlalchemy/sql/util.py
--- a/lib/sqlalchemy/sql/util.py Sat Feb 02 18:59:19 2013 -0500
+++ b/lib/sqlalchemy/sql/util.py Sat Feb 02 19:49:44 2013 -0500
@@ -449,7 +449,7 @@
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
this is related to a fix coming up for #1768
Comments (2)
-
reporter -
reporter - removed milestone
Removing milestone: 0.8.0final (automated comment)
- Log in to comment
af44efe26e3f703ca1c30e79ee68428eed35abcf