public function matching(Criteria $criteria): array
    {
        $queryBuilder = $this->entityManager->createQueryBuilder()
            ->select('e.id')
            ->from($this->getEntityName(), 'e');

        $queryBuilder->addCriteria($criteria);

        $ids = $queryBuilder->getQuery()->getResult(ColumnHydrator::HYDRATOR_MODE);

        if (count($ids) === 0) {
            return [];
        }

        return $this->findByIds($ids);
    }
public function matching(Criteria $criteria): array
    {
        $queryBuilder = $this->entityManager->createQueryBuilder()
            ->select('e.id')
            ->from($this->getEntityName(), 'e');

        $queryBuilder->addCriteria($criteria);

        $ids = $queryBuilder->getQuery()->getResult(ColumnHydrator::HYDRATOR_MODE);

        if (count($ids) === 0) {
            return [];
        }

        return $this->findByIds($ids);
    }
public function matching ( Criteria $ criteria ) : array { $ queryBuilder = $ this -> entityManager -> createQueryBuilder ( ) -> select ( 'e.id' ) -> from ( $ this -> getEntityName ( ) , 'e' ) ; $ queryBuilder -> addCriteria ( $ criteria ) ; $ ids = $ queryBuilder -> getQuery ( ) -> getResult ( ColumnHydrator :: HYDRATOR_MODE ) ; if ( count ( $ ids ) === 0 ) { return [ ] ; } return $ this -> findByIds ( $ ids ) ; }
Gets all entities matching query criteria

@param Criteria $criteria

@return array
Gets all entities matching query criteria