$this->criteriaPartResolver->
resolve($criteria->
getSorting(),
$definition,
$query,
$context);
// do not use grouped filters, because the grouped filters are mapped flat and the logical OR/AND are removed
$filter =
new AndFilter(array_merge( $criteria->
getFilters(),
$criteria->
getPostFilters() ));
$this->
addFilter($definition,
$filter,
$query,
$context);
$this->
addQueries($definition,
$criteria,
$query,
$context);
if ($criteria->
getLimit() === 1
) { $query->
removeState(EntityDefinitionQueryHelper::HAS_TO_MANY_JOIN
);
} $this->
addSortings($definition,
$criteria,
$criteria->
getSorting(),
$query,
$context);
return $query;
} public function addFilter(EntityDefinition
$definition, ?Filter
$filter, QueryBuilder
$query, Context
$context): void
{