]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
associationproxy relies upon a "sweep" through the attributes at the class level,
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 6 Sep 2007 16:58:02 +0000 (16:58 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 6 Sep 2007 16:58:02 +0000 (16:58 +0000)
restored the equivalent functionality from previous releases

lib/sqlalchemy/orm/attributes.py

index c2746d9e98cde91297132c8f14c0604224f09bfe..559b97e5ab835dc9e8b3d01ddeaaccfb793f157f 100644 (file)
@@ -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