summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2007-09-06 16:58:02 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2007-09-06 16:58:02 +0000
commit4245d758850bf847d87fe2c9b48d3df82e578c2c (patch)
tree7d74c472658253e34266962f2596abb27df18a43
parent986e82700e2ddd82a74c4b5a48fa49d4fa89bdec (diff)
downloadsqlalchemy-4245d758850bf847d87fe2c9b48d3df82e578c2c.tar.gz
associationproxy relies upon a "sweep" through the attributes at the class level,
restored the equivalent functionality from previous releases
-rw-r--r--lib/sqlalchemy/orm/attributes.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/sqlalchemy/orm/attributes.py b/lib/sqlalchemy/orm/attributes.py
index c2746d9e9..559b97e5a 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