public function executeRemoves()
 {
     foreach ($this->unitOfWork->getObjectsToRemove() as $object) {
         $this->unitOfWork->getObjectPersister($object)->removeObject($object);
         $this->objectIdentityMap->detach($object);
         $this->eventDispatcher->dispatchLifecycleEvent(Events::postRemove, $object);
     }
 }
 /**
  * @param object $object
  */
 public function detach($object)
 {
     $this->objectIdentityMap->detach($object);
 }