Parse the given JoinColumn into an array

@param ORM\JoinColumn $joinColumnAnnotation
@param string $propertyName
@return array
356230
protected function joinColumnToArray(ORM\JoinColumn $joinColumnAnnotation, $propertyName = null)
    {
        return [
            'name' => $joinColumnAnnotation->name === null ? $propertyName : $joinColumnAnnotation->name,
            'unique' => $joinColumnAnnotation->unique,
            'nullable' => $joinColumnAnnotation->nullable,
            'onDelete' => $joinColumnAnnotation->onDelete,
            'columnDefinition' => $joinColumnAnnotation->columnDefinition,
            'referencedColumnName' => $joinColumnAnnotation->referencedColumnName,
        ];
    }
245420
public static function collect(string $className, $objectAnnotation = null, string $propertyName = '', string $methodName = '', $propertyValue = null)
    {
        if ($objectAnnotation instanceof Connection) {
            $type   = $objectAnnotation->getType();
            $driver = $objectAnnotation->getDriver();
            self::$connects[$driver][$type] = $className;
        }
    }
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;
            }
        );
    }
757419
protected function getSelectJoinColumnSQL($tableAlias, $joinColumnName, $className, $type)
    {
        $columnAlias = $this->getSQLColumnAlias($joinColumnName);

        $this->currentPersisterContext->rsm->addMetaResult('r', $columnAlias, $joinColumnName, false, $type);

        return $tableAlias . '.' . $joinColumnName . ' AS ' . $columnAlias;
    }
815705
public function join(Collection $collection, $onProperty = null, $sourceProperty = null) {
		if ($collection->isEmpty()) {
			return $this;
		}
		
		$sourcePrimary = $collection->getPrimary();
		
		if ($onProperty === null) {
			if ($sourcePrimary === null) {
				throw new Exception('Unable to determine a property for join');
			} else {
				$onProperty = $sourcePrimary;
			}
		}
		
		if ($sourceProperty === null) {
			$sourceProperty = $onProperty;
		}

		if ($sourceProperty !== $sourcePrimary) {
			$collection = clone $collection;
			$collection->setPrimary($sourceProperty);
		}
		
		$source = &$collection->getDataLinked();

		foreach ($this->_data as &$item) {
			if (isset($item[$onProperty], $source[$item[$onProperty]])) {
				$item += $source[$item[$onProperty]];
			}
		}
		unset($item, $source);
		
		return $this;
	}
51596
public function joinColumn($joinColumn, $references = 'id', $unique = false)
    {
        $this->addJoinColumn(null, $joinColumn, $references, false, $unique);

        return $this;
    }
1370664
protected function mapViaMapper($propertyName, $columnName, $mapperClassName)
    {
        if (!$columnName) {
            $propertyName = $columnName;
        }

        $this->properties[]                       = $propertyName;
        $this->columnsToProperties[$columnName]   = $propertyName;
        $this->propertiesToMappers[$propertyName] = $mapperClassName;

        return $this;
    }
1022178
public function getPropertiesRequiredFor(string $columnName) : array
    {
        $propertyNames = [];

        foreach ($this->propertyComponentIdMap as $propertyName => $componentId) {
            if ($this->getColumnNameFromComponentId($componentId) === $columnName) {
                $propertyNames[$propertyName] = $propertyName;
            }
        }

        return $propertyNames;
    }
295420
public function buildJunctionJoinColumnName(\ReflectionClass $targetClass, string $targetIdPropertyName, 
			string $joinColumnName = null): string {
		if ($joinColumnName !== null) return $joinColumnName;
		
		return StringUtils::hyphenated($targetClass->getShortName() . ucfirst($targetIdPropertyName));
	}
525906
public static function collect(string $className, $objectAnnotation = null, string $propertyName = "", string $methodName = "", $propertyValue = null)
    {
        if ($objectAnnotation instanceof Definition) {

            $name = $objectAnnotation->getName();
            self::$definitions[$className] = empty($name) ? $className : $name;
        }
    }
914167
public function parser(string $className, $objectAnnotation = null, string $propertyName = "", string $methodName = "", $propertyValue = null)
    {
        $scope    = Scope::PROTOTYPE;
        $name     = $objectAnnotation->getName();
        $beanName = empty($name) ? $className : $name;

        ProcessCollector::collect($className, $objectAnnotation, $propertyName, $methodName, $propertyValue);

        return [$beanName, $scope, ""];
    }
36431
public function getEmbeddedColumnsMappedTo(string $propertyName): array
    {
        $this->class->getProperty($propertyName);

        if (isset($this->propertyColumnNameMap[$propertyName])) {
            return [$this->propertyColumnNameMap[$propertyName]];
        }

        $relation = $this->getRelationMappedToProperty($propertyName);

        if ($relation) {
            return $relation->getParentColumnsToLoad();
        }

        throw InvalidOperationException::format('No columns mapped to property \'%s\'', $propertyName);
    }
962696
public function getPropertyLinkedToColumn(string $columnName)
    {
        $columnName = array_search($columnName, $this->propertyColumnNameMap, true);

        return $columnName ? $columnName : null;
    }
103775
public function requestColumn(string $propertyName, string $columnName = null, array $relatedComponents = array()) {
		$determineColumnName = $this->determineColumnName($propertyName, $columnName === null, $relatedComponents);
		if ($columnName === null) {
			$columnName = $determineColumnName;
		}
		
		$columnName = $this->namingStrategy->buildColumnName($propertyName, $columnName);
		
		$this->setupProcess->registerColumnName($columnName, $this->buildPropertyString($propertyName), $relatedComponents);
		
		return $columnName;
	}
1216465
public static function parseByPolymorphicManyToMany($model, $propertyName, $annotation)
    {
        $className = BeanFactory::getObjectClass($model);

        $struct = new PolymorphicManyToMany($className, $propertyName, $annotation);
        $middleModel = $struct->getMiddleModel();
        $middleLeftField = $struct->getMiddleLeftField();
        $leftField = $struct->getLeftField();

        foreach($model->$propertyName as $index => $row)
        {
            if(!$row instanceof $middleModel)
            {
                $row = $middleModel::newInstance($row);
                $model->$propertyName[$index] = $row;
            }
            $row[$middleLeftField] = $model->$leftField;
            $row[$annotation->type] = $annotation->typeValue;
            $row->insert();
        }
    }
780923
private function tokenToColumn($token, $namingConvention, $class)
    {
        // Find a matching property
        $property = null;
        foreach ($class->getProperties() as $prop) {
            if (strcasecmp($token->getSource(), $prop->getName()) === 0) {
                $property = $prop;
                break;
            }
        }

        if ($property === null) {
            throw new DslSyntaxException('No matching property found for ' . $token->getSource());
        }

        return $namingConvention->propertyToColumnName($property);
    }
819801
private function joinColumnToArray(JoinColumn $joinColumn)
    {
        return [
            'name' => $joinColumn->name,
            'unique' => $joinColumn->unique,
            'nullable' => $joinColumn->nullable,
            'onDelete' => $joinColumn->onDelete,
            'columnDefinition' => $joinColumn->columnDefinition,
            'referencedColumnName' => $joinColumn->referencedColumnName,
        ];
    }