예제 #1
0
 def execute_aggregate(self, uow, recs):
     cls_ = self.__class__
     mapper = self.mapper
     our_recs = [
         r for r in recs if r.__class__ is cls_ and r.mapper is mapper
     ]
     recs.difference_update(our_recs)
     states = [self.state] + [r.state for r in our_recs]
     persistence.delete_obj(mapper, [s for s in states if uow.states[s][0]],
                            uow)
예제 #2
0
 def execute_aggregate(self, uow, recs):
     cls_ = self.__class__
     mapper = self.mapper
     our_recs = [
         r for r in recs if r.__class__ is cls_ and r.mapper is mapper
     ]
     recs.difference_update(our_recs)
     states = [self.state] + [r.state for r in our_recs]
     persistence.delete_obj(mapper, [s for s in states if uow.states[s][0]],
                            uow)
예제 #3
0
 def execute(self, uow):
     persistence.delete_obj(self.mapper,
         uow.states_for_mapper_hierarchy(self.mapper, True, False),
         uow
     )
예제 #4
0
 def execute(self, uow):
     persistence.delete_obj(
         self.mapper,
         uow.states_for_mapper_hierarchy(self.mapper, True, False), uow)