Exemplo n.º 1
0
 def unregister(self, entity_class, entity):
     """
     Unregisters the given entity for the given class and discards its
     state information.
     """
     EntityState.release(entity, self)
     self.__entity_set_map[entity_class].remove(entity)
Exemplo n.º 2
0
 def unregister(self, entity_class, entity):
     """
     Unregisters the given entity for the given class and discards its
     state information.
     """
     EntityState.release(entity, self)
     self.__entity_set_map[entity_class].remove(entity)
Exemplo n.º 3
0
 def reset(self):
     """
     Releases all entities held by this Unit Of Work (i.e., removes state
     information from all registered entities and clears the entity map).
     """
     for ents in self.__entity_set_map.values():
         for ent in ents:
             EntityState.release(ent, self)
     self.__entity_set_map.clear()
Exemplo n.º 4
0
 def reset(self):
     """
     Releases all entities held by this Unit Of Work (i.e., removes state
     information from all registered entities and clears the entity map).
     """
     for ents in self.__entity_set_map.values():
         for ent in ents:
             EntityState.release(ent, self)
     self.__entity_set_map.clear()