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):
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()
return sqlalchemy.mapper.object_mapper(obj)
uow = util.ScopedRegistry(lambda: UnitOfWork(), "thread")
-
+global_attributes = UOWAttributeManager()