private function preDelete()
{
if (!count($this->preDelete)) {
return true;
}
foreach ($this->preDelete as $usage) {
$findRelations = $this->findRelations($usage);
if (count($findRelations) > 0) {
foreach ($findRelations as $relation) {
$this->em->remove($relation);
}
}
}
$this->em->flush();
return true;
}