From: Mike Bayer Date: Thu, 6 Sep 2007 16:58:02 +0000 (+0000) Subject: associationproxy relies upon a "sweep" through the attributes at the class level, X-Git-Tag: rel_0_4beta6~42 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4245d758850bf847d87fe2c9b48d3df82e578c2c;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git associationproxy relies upon a "sweep" through the attributes at the class level, restored the equivalent functionality from previous releases --- diff --git a/lib/sqlalchemy/orm/attributes.py b/lib/sqlalchemy/orm/attributes.py index c2746d9e98..559b97e5ab 100644 --- a/lib/sqlalchemy/orm/attributes.py +++ b/lib/sqlalchemy/orm/attributes.py @@ -834,6 +834,11 @@ class AttributeManager(object): """decorate the constructor of the given class to establish attribute management on new instances.""" + # do a sweep first, this also helps some attribute extensions + # (like associationproxy) become aware of themselves at the + # class level + self.unregister_class(class_) + oldinit = None doinit = False