protected function processDeletedObjects()
{
foreach ($this->deletedEntities as $entity) {
if ($this->persistenceSession->hasObject($entity)) {
$this->removeEntity($entity);
$this->persistenceSession->unregisterReconstitutedEntity($entity);
$this->persistenceSession->unregisterObject($entity);
}
}
$this->deletedEntities = new \SplObjectStorage();
}