resetPostFilters example

$ids = [];
        foreach ($mapping as $associationIds) {
            foreach ($associationIds as $associationId) {
                $ids[] = $associationId;
            }
        }

        $fieldCriteria->setIds(\array_filter($ids));
        $fieldCriteria->resetSorting();
        $fieldCriteria->resetFilters();
        $fieldCriteria->resetPostFilters();

        $referenceClass = $association->getReferenceDefinition();
        /** @var EntityCollection<Entity> $collectionClass */
        $collectionClass = $referenceClass->getCollectionClass();

        $data = $this->_read(
            $fieldCriteria,
            $referenceClass,
            $context,
            new $collectionClass(),
            $referenceClass->getFields()->getBasicFields(),
            


    private function fetchAggregation(
        Aggregation $aggregation,
        EntityDefinition $definition,
        Criteria $criteria,
        Context $context
    ): AggregationResult {
        $clone = clone $criteria;
        $clone->resetAggregations();
        $clone->resetSorting();
        $clone->resetPostFilters();
        $clone->resetGroupFields();

        // Early resolve terms to extract score queries         if ($clone->getTerm()) {
            $pattern = $this->interpreter->interpret((string) $criteria->getTerm());
            $queries = $this->scoreBuilder->buildScoreQueries($pattern$definition$definition->getEntityName()$context);
            $clone->addQuery(...$queries);
            $clone->setTerm(null);
        }

        $scoreCriteria = clone $clone;
        
Home | Imprint | This part of the site doesn't use cookies.