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);
    }