Esempio n. 1
0
 def commit(self, unit_of_work):
     """
     Dump all resources that were modified by the given session back into
     the repository.
     """
     MemoryRepository.commit(self, unit_of_work)
     if self.is_initialized:
         entity_classes_to_dump = set()
         for state in unit_of_work.iterator():
             entity_classes_to_dump.add(type(state.entity))
         for entity_cls in entity_classes_to_dump:
             self.__dump_entities(entity_cls)