def __init__(self, name, aggregate_class=None, join_transaction=False, autocommit=False): if aggregate_class is None: aggregate_class = MemoryAggregate Repository.__init__(self, name, aggregate_class, join_transaction=join_transaction, autocommit=autocommit) self.__cache_mgr = EntityCacheManager(self) # By default, we do not use a cache loader. self.configure(cache_loader=None)
def __init__(self, repository): self.__repository = repository self.__unit_of_work = UnitOfWork() self.__cache_mgr = EntityCacheManager(repository, self.__load_from_repository) self.__need_datamanager_setup = repository.join_transaction is True