getSourceColumn example

if ($context->getQuery()->hasState($alias)) {
            return $alias;
        }
        $context->getQuery()->addState($alias);

        $reference = $field->getReferenceDefinition();

        $table = $reference->getEntityName();

        $versionAware = $context->getDefinition()->isVersionAware() && $reference->isVersionAware();

        $source = $this->getSourceColumn($context->getDefinition()$field$context->getAlias()$context->getContext());

        $referenceColumn = $this->getReferenceColumn($field$context->getContext());

        // specified version requested, use sub version call to solve live version or specified         if ($versionAware && $context->getContext()->getVersionId() !== Defaults::LIVE_VERSION) {
            $this->joinVersion($field$context->getAlias()$alias$context->getQuery()$context->getContext()$source$referenceColumn);

            return $alias;
        }

        // No Blacklisting Whitelisting for ManyToOne Association because of possible Dependencies on subentities
continue;
            }
            $this->resolveField($group$accessor$definition$nested$context);
        }

        $alias = $definition->getEntityName() . '.' . $first->getPropertyName() . $group->getSuffix();

        $this->parseFilter($group$definition$nested$context$alias);

        $parameters = [
            '#root#' => self::escape($definition->getEntityName()),
            '#source_column#' => $this->getSourceColumn($first$context),
            '#alias#' => self::escape($alias),
        ];

        $query->leftJoin(
            self::escape($definition->getEntityName()),
            '(' . $nested->getSQL() . ')',
            self::escape($alias),
            str_replace(
                array_keys($parameters),
                array_values($parameters),
                '#root#.#source_column# = #alias#.`id`'
                .


    private function handleTable(MediaPosition $mediaPosition): void
    {
        $sql = sprintf(
            'INSERT INTO s_media_used SELECT DISTINCT NULL, media.id FROM s_media media INNER JOIN %1$s ON %1$s.%2$s = media.%3$s',
            $mediaPosition->getSourceTable(),
            $mediaPosition->getSourceColumn(),
            $mediaPosition->getMediaColumn()
        );

        $this->connection->executeStatement($sql);
    }

    private function addMediaByPathToUsedTable(string $path): void
    {
        $path = $this->mediaService->normalize($path);
        $this->queue['path'][] = $path;
    }

    


        $context->getQuery()->addState(EntityDefinitionQueryHelper::HAS_TO_MANY_JOIN);

        $alias = $context->getAlias() . '.' . $field->getPropertyName();
        if ($context->getQuery()->hasState($alias)) {
            return $alias;
        }

        $context->getQuery()->addState($alias);

        $source = $this->getSourceColumn($context$field);

        $referenceColumn = $this->getReferenceColumn($context$field);

        $parameters = [
            '#source#' => $source,
            '#alias#' => EntityDefinitionQueryHelper::escape($alias),
            '#reference_column#' => $referenceColumn,
            '#root#' => EntityDefinitionQueryHelper::escape($context->getAlias()),
        ];

        $versionWhere = $this->buildVersionWhere($context$field);

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