From c92b7e875632b0607c994e576ea9c938b3578cbc Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Tue, 18 Oct 2005 03:12:22 +0000 Subject: [PATCH] --- lib/sqlalchemy/objectstore.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/sqlalchemy/objectstore.py b/lib/sqlalchemy/objectstore.py index 24bccf4323..638f910c4a 100644 --- a/lib/sqlalchemy/objectstore.py +++ b/lib/sqlalchemy/objectstore.py @@ -70,7 +70,7 @@ def has_key(key): class UOWSmartProperty(attributes.SmartProperty): def attribute_registry(self): - return uow().attributes + return global_attributes class UOWListElement(attributes.ListElement): def __init__(self, obj, key, data=None, deleteremoved=False): @@ -109,11 +109,10 @@ class UnitOfWork(object): self.is_begun = is_begun if parent is not None: self.identity_map = parent.identity_map - self.attributes = parent.attributes else: self.identity_map = {} - self.attributes = UOWAttributeManager() + self.attributes = global_attributes self.new = util.HashSet(ordered = True) self.dirty = util.HashSet() self.modified_lists = util.HashSet() @@ -582,5 +581,5 @@ def object_mapper(obj): return sqlalchemy.mapper.object_mapper(obj) uow = util.ScopedRegistry(lambda: UnitOfWork(), "thread") - +global_attributes = UOWAttributeManager() -- 2.47.2