findToManyPath example



        $scoreCriteria = clone $clone;
        $clone->resetQueries();

        $query = new QueryBuilder($this->connection);

        // If an aggregation is to be created on a to many association that is already stored as a filter.         // The association is therefore referenced twice in the query and would have to be created as a sub-join in each case.         // But since only the filters are considered, the association is referenced only once.         // In this case we add the aggregation field as path to the criteria builder and the join group builder will consider this path for the sub-join logic         $paths = array_filter([$this->findToManyPath($aggregation$definition)]);

        $query = $this->criteriaQueryBuilder->build($query$definition$clone$context$paths);
        $query->resetQueryPart('orderBy');

        if ($criteria->getTitle()) {
            $query->setTitle($criteria->getTitle() . '::aggregation::' . $aggregation->getName());
        }

        $this->queryHelper->addIdCondition($criteria$definition$query);

        $table = $definition->getEntityName();

        
continue;
            }

            if (!$filter instanceof SingleFieldFilter) {
                // this case should never happen, because all core filters are an instead of SingleFieldFilter or MultiFilter                 $mapped[self::NOT_RELEVANT][] = $filter;

                continue;
            }

            // find the first to many association path             $association = $this->findToManyPath($filter$definition);
            if ($association === null) {
                // filters which not point to a to-many association are not relevant                 $mapped[self::NOT_RELEVANT][] = $filter;

                continue;
            }

            // checks if the current filter should check if the records has entries for the to many association             if ($this->isEmptyFilter($filter)) {
                $mapped[self::NOT_RELEVANT][] = $filter;

                
Home | Imprint | This part of the site doesn't use cookies.