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)
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)
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()
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()