Defines a member expression to map to a table column component.

@param string $memberExpression

@return ColumnMappingDefiner
@throws InvalidArgumentException
185392
public function property(string $memberExpression) : ColumnMappingDefiner
    {
        $this->memberParser->parse($this->class, $memberExpression);

        return new ColumnMappingDefiner(
            function (IColumn $column) use ($memberExpression) {
                $this->column($column);
                $this->propertyComponentIdMap[$memberExpression] = $column->getComponentId();
            },
            function ($componentId) use ($memberExpression) {
                $this->propertyComponentIdMap[$memberExpression] = $componentId;
            }
        );
    }
1116658
public function setExpressions(array $expressions)
    {
        foreach ($expressions as $expression) {
            if (! $expression instanceof AbstractExpression) {
                throw new \InvalidArgumentException(
                    'Error: Expected array of AbstractExpression but got something else'
                );
            }
        }

        $this->expressions = $expressions;
    }
844908
protected function mapFinalMember(
        IObjectMapper $mapper,
        array $subclassMappings,
        array $nestedRelations,
        IMemberExpression $lastPart
    ) : MemberMapping
    {
        switch (true) {
            case $lastPart instanceof SelfExpression:
                /** @var IEntityMapper $mapper */
                return $this->mapFinalSelfRelation($mapper);

            case $lastPart instanceof MemberPropertyExpression:
                return $this->mapFinalPropertyToMapping($subclassMappings, $nestedRelations, $lastPart->getProperty());

            case $lastPart instanceof LoadIdFromEntitySetMethodExpression:
                $relations    = $this->mapLoadExpressionToRelations($mapper, $lastPart);
                $lastRelation = array_pop($relations);

                return $this->mapFinalRelationToMapping($subclassMappings, array_merge($nestedRelations, $relations), $lastRelation);

            case $lastPart instanceof CollectionCountMethodExpression:
                $lastRelation = array_pop($nestedRelations);

                return new ToManyRelationCountMapping($this->rootEntityMapper, $subclassMappings, $nestedRelations, $lastRelation);

            case $lastPart instanceof ObjectSetAggregateMethodExpression:
                $lastRelation = array_pop($nestedRelations);

                return $this->mapFinalAggregateExpression($subclassMappings, $nestedRelations, $lastRelation, $lastPart);

            case $lastPart instanceof ObjectSetFlattenMethodExpression:
                $relations    = $this->mapMemberExpressionsToRelations($mapper, [$lastPart]);
                $lastRelation = array_pop($relations);

                return $this->mapFinalRelationToMapping($subclassMappings, array_merge($nestedRelations, $relations), $lastRelation);
        }

        throw InvalidArgumentException::format('unknown final member expression type %s', Debug::getType($lastPart));
    }
901388
protected function addFilterToQueryBuilder(array $filter, QueryBuilder $queryBuilder)
    {
        $objectManager    = $this->getObjectManager();
        $entityClassAlias = $this->getEntityClassAlias();
        $classMetaData    = $objectManager->getClassMetadata($this->getEntityClass());
        $assocMappings    = $classMetaData->getAssociationMappings();

        $andExpressions = array();
        $paramCounter   = 0;

        foreach ($filter as $property => $value) {
            if (empty($value)) {
                continue;
            }

            if (!isset($assocMappings[$property])) {
                throw new \InvalidArgumentException('Unkown association "' . $property . '"');
            }
            $paramCounter++;
            $queryBuilder->andWhere($queryBuilder->expr()->eq($entityClassAlias . '.' .$property, '?' . $paramCounter));
            $queryBuilder->setParameter($paramCounter, $value);

        }

        return $paramCounter;
    }
1301855
final public function whereIn(string $memberExpression, array $values)
    {
        return $this->where($memberExpression, ConditionOperator::IN, $values);
    }
1355808
public static void addExpressionToAnnotationMember(AnnotationNode annotationNode, String memberName, Expression expression) {
        Expression exclude = annotationNode.getMember(memberName);
        if(exclude instanceof ListExpression) {
            ((ListExpression)exclude).addExpression(expression);
        }
        else if(exclude != null) {
            ListExpression list = new ListExpression();
            list.addExpression(exclude);
            list.addExpression(expression);
            annotationNode.setMember(memberName, list);
        }
        else {
            annotationNode.setMember(memberName, expression);
        }
    }
719589
public static function checkMemberName($memberName) {
		$globallyAllowedCharacters  = 'a-zA-Z0-9';
		$generallyAllowedCharacters = $globallyAllowedCharacters.'_-';
		
		$regex = '{^
			(
				['.$globallyAllowedCharacters.']
				
				|
				
				['.$globallyAllowedCharacters.']
				['.$generallyAllowedCharacters.']*
				['.$globallyAllowedCharacters.']
			)
		$}x';
		
		if (preg_match($regex, $memberName) === 1) {
			return;
		}
		
		throw new InputException('invalid member name "'.$memberName.'"');
	}
799968
public function mapMemberExpression(NestedMember $member) : MemberMapping
    {
        try {
            $subclassMappings = $this->findSubclassMappings(
                $this->rootEntityMapper,
                $member
            );

            $nestedRelations = $this->mapMemberExpressionsToRelations(
                $this->rootEntityMapper,
                $member->getPartsExceptLast(),
                $finalMapper
            );

            return $this->mapFinalMember($finalMapper, $subclassMappings, $nestedRelations, $member->getLastPart());
        } catch (BaseException $inner) {
            if ($inner instanceof MemberExpressionMappingException && $inner->getPrevious()) {
                $inner = $inner->getPrevious();
            }

            throw new MemberExpressionMappingException(
                sprintf(
                    'Could not map member expression \'%s\' of entity type %s: %s',
                    $member->asString(), $this->rootEntityMapper->getObjectType(), $inner->getMessage()
                ),
                1,
                $inner
            );
        }
    }
1298556
public function onPropertyAccessExpression($expression)
    {
        $parent = $expression;
        $variable = null;
        do {
            $variable = $parent->getResourceProperty()->getName() . self::MEMBER_ACCESS . $variable;
            $parent = $parent->getParent();
        } while ($parent != null);
        $variable = rtrim($variable, self::MEMBER_ACCESS);
        $variable = $this->getIteratorName() . self::MEMBER_ACCESS . $variable;
        return $variable;
    }
503908
public function fromPreviousTable(string $tableName) : GroupedTableDefiner
    {
        if (!isset($this->previousTables[$tableName])) {
            throw InvalidArgumentException::format(
                'Invalid table name supplied to %s: expecting one of (%s), \'%s\' given',
                __METHOD__, Debug::formatValues(array_keys($this->previousTables)), $tableName
            );
        }

        return new GroupedTableDefiner($this->name, $this->callback, $this->previousTables[$tableName]->getDataSource());
    }
330981
public function getFieldForColumn($columnName)
    {
        if (isset($this->fieldNames[$columnName])) {
            return $this->fieldNames[$columnName];
        } else {
            foreach ($this->associationMappings as $assocName => $mapping) {
                if ($this->isAssociationWithSingleJoinColumn($assocName) &&
                    $this->associationMappings[$assocName]['joinColumns'][0]['name'] == $columnName) {

                    return $assocName;
                }
            }

            throw MappingException::noFieldNameFoundForColumn($this->name, $columnName);
        }
    }
235635
public function column(string $columnName): ColumnTypeDefiner
    {
        return new ColumnTypeDefiner(
            $this,
            function (Column $column) {
                $this->addColumn($column);
            },
            $columnName
        );
    }
452153
public function set(string $column, Expr $expression)
    {
        $this->columnSetMap[$column] = $expression;

        return $this;
    }
206773
public function searchableBy(string ... $memberExpressions)
    {
        $this->updateOptions(function (ObjectIdentityOptions $options) use ($memberExpressions) {
            if ($options instanceof EntityIdOptions) {
                return $options->withFilterByMemberExpressions($memberExpressions);
            }

            throw InvalidOperationException::methodCall(__METHOD__, 'filtering is only supported on entity sets');
        });

        return $this;
    }
1034596
private function mapMemberCondition(MemberCondition $condition, Select $select, array $memberMappings) : Expr
    {
        $mapping = $memberMappings[$condition->getNestedMember()->asString()];

        return $mapping->getMapping()
            ->getWhereConditionExpr($select, $mapping->getLastTableAlias(), $condition->getOperator(), $condition->getValue());
    }
273207
public function whereCollectionContains(string $collectionMemberExpression, $item)
    {
        $expression           = $this->memberExpressionParser->parse($this->class, $collectionMemberExpression);
        $isEntityIdCollection = $expression->getResultingType()->nonNullable()->isSubsetOf(EntityIdCollection::type());

        if ($isEntityIdCollection) {
            $memberParts                = explode('.', $collectionMemberExpression);
            $lastPart                   = array_pop($memberParts);
            $memberParts[]              = 'loadAll(' . $lastPart . ')';
            $collectionMemberExpression = implode('.', $memberParts);
            $expression                 = $this->memberExpressionParser->parse($this->class, $collectionMemberExpression);
        }

        /** @var CollectionType $collectionType */
        $collectionType = $expression->getResultingType()->nonNullable();
        if (!$collectionType->isSubsetOf(Type::collectionOf(TypedObject::type()))) {
            throw InvalidMemberExpressionException::format(
                'Invalid collection member expression supplied to %s: expecting type %s, %s (\'%s\') given',
                __METHOD__, Type::collectionOf(TypedObject::type())->asTypeString(),
                $collectionType->asTypeString(), $collectionMemberExpression
            );
        }

        /** @var string|TypedObject $objectType */
        $objectType = $collectionType->getElementType()->asTypeString();

        if ($isEntityIdCollection) {
            if (!is_int($item)) {
                throw InvalidArgumentException::format(
                    'Invalid collection item supplied to %s: expecting type %s, %s given',
                    __METHOD__, $objectType, Type::from($item)->asTypeString()
                );
            }

            $specification = $objectType::specification(function (SpecificationDefinition $match) use ($item) {
                $match->where(Entity::ID, '=', $item);
            });
        } else {
            if (!($item instanceof $objectType)) {
                throw InvalidArgumentException::format(
                    'Invalid collection item supplied to %s: expecting type %s, %s given',
                    __METHOD__, $objectType, Type::from($item)->asTypeString()
                );
            }

            $specification = $objectType::specification(function (SpecificationDefinition $match) use ($item) {
                $match->where('this', '=', $item);
            });
        }

        return $this->whereHasAny($collectionMemberExpression, $specification);
    }
898506
public function to(string $columnName) : ColumnTypeDefiner
    {
        return new ColumnTypeDefiner(
                $this->definition,
                $this->callback,
                $columnName
        );
    }