From 4245d758850bf847d87fe2c9b48d3df82e578c2c Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Thu, 6 Sep 2007 16:58:02 +0000 Subject: [PATCH] associationproxy relies upon a "sweep" through the attributes at the class level, restored the equivalent functionality from previous releases --- lib/sqlalchemy/orm/attributes.py | 5 +++++ 1 file changed, 5 insertions(+) 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 -- 2.47.3