src/Repository/Doctrine/ORMRepository.php
public function deleteBy($criteria)
    {
        $criteria = Util::normalizeCriteria($criteria);

        $queryBuilder = $this->getQueryBuilder($criteria);
        $queryBuilder->delete($this->entityName, 'e');
        $queryBuilder->getQuery()->execute();
    }
public function deleteBy($criteria)
    {
        $criteria = Util::normalizeCriteria($criteria);

        $queryBuilder = $this->getQueryBuilder($criteria);
        $queryBuilder->delete($this->entityName, 'e');
        $queryBuilder->getQuery()->execute();
    }
public function deleteBy ( $ criteria ) { $ criteria = Util :: normalizeCriteria ( $ criteria ) ; $ queryBuilder = $ this -> getQueryBuilder ( $ criteria ) ; $ queryBuilder -> delete ( $ this -> entityName , 'e' ) ; $ queryBuilder -> getQuery ( ) -> execute ( ) ; }
Removes objects by a set of criteria.

@param array|Criteria $criteria
@return void
@throws \Doctrine\ORM\Query\QueryException
Removes objects by a set of criteria .