public function deleteNotes($entity) { if ($entity->getNotes()) { $this->deleteAllEntitiesOfCollection($entity->getNotes()); } }