private function buildCriteria(QueryBuilder $qb, array $mapIds, $fieldClass, $fieldId): void
    {
        if (!empty($mapIds)) {
            $where = '';
            $parameters = [];
            $i = 0;

            foreach ($mapIds as $type => $identifiers) {
                $pClass = $fieldClass.'_'.$i;
                $pIdentifiers = $fieldId.'s_'.$i;
                $parameters[$pClass] = $type;
                $parameters[$pIdentifiers] = $identifiers;
                $where .= '' === $where ? '' : ' OR ';
                $where .= sprintf('(s.%s = :%s AND s.%s IN (:%s))', $fieldClass, $pClass, $fieldId, $pIdentifiers);
                ++$i;
            }

            $qb->andWhere($where);

            foreach ($parameters as $key => $identifiers) {
                $qb->setParameter($key, $identifiers);
            }
        }
    }