src/app/n2n/impl/persistence/orm/property/hangar/relation/ManyToOnePropDef.php
public function applyDbMeta(DbInfo $dbInfo, PropSourceDef $propSourceDef, EntityProperty $entityProperty, 
			AnnotationSet $annotationSet) {
		ArgUtils::assertTrue($entityProperty instanceof ToOneEntityProperty);
		
		$relation = $entityProperty->getRelation();
		ArgUtils::assertTrue($relation instanceof JoinColumnToOneRelation);
		
		$joinColumnName = $relation->getJoinColumnName();
		$table = $dbInfo->getTable();
		if (!$table->containsColumnName($joinColumnName)) {
			$relation->getTargetEntityModel()->getTableName();
			$targetEntityProperty = $relation->getTargetEntityModel()->getIdDef()->getEntityProperty();
			
			//@todo @andi: das sollte einfach sein eine lösung zu finden, sobald das die EntityProperties selbst können
			if ($targetEntityProperty instanceof IntEntityProperty || $targetEntityProperty->getName() === 'id') {
				$dbInfo->getTable()->createColumnFactory()->createIntegerColumn($joinColumnName, 
						$this->columnDefaults->getDefaultIntegerSize(), $this->columnDefaults->getDefaultInterSigned());
			} else {
				$dbInfo->getTable()->createColumnFactory()->createStringColumn($joinColumnName, 
						$this->columnDefaults->getDefaultStringLength(), $this->columnDefaults->getDefaultStringCharset());
			}
		}
		
		if (!$this->hasIndexForColumn($dbInfo->getTable(), $joinColumnName)) {
			$dbInfo->getTable()->createIndex(IndexType::INDEX, array($joinColumnName));
		}
	}
public function applyDbMeta(DbInfo $dbInfo, PropSourceDef $propSourceDef, EntityProperty $entityProperty, 
			AnnotationSet $annotationSet) {
		ArgUtils::assertTrue($entityProperty instanceof ToOneEntityProperty);
		
		$relation = $entityProperty->getRelation();
		ArgUtils::assertTrue($relation instanceof JoinColumnToOneRelation);
		
		$joinColumnName = $relation->getJoinColumnName();
		$table = $dbInfo->getTable();
		if (!$table->containsColumnName($joinColumnName)) {
			$relation->getTargetEntityModel()->getTableName();
			$targetEntityProperty = $relation->getTargetEntityModel()->getIdDef()->getEntityProperty();
			
			//@todo @andi: das sollte einfach sein eine lösung zu finden, sobald das die EntityProperties selbst können
			if ($targetEntityProperty instanceof IntEntityProperty || $targetEntityProperty->getName() === 'id') {
				$dbInfo->getTable()->createColumnFactory()->createIntegerColumn($joinColumnName, 
						$this->columnDefaults->getDefaultIntegerSize(), $this->columnDefaults->getDefaultInterSigned());
			} else {
				$dbInfo->getTable()->createColumnFactory()->createStringColumn($joinColumnName, 
						$this->columnDefaults->getDefaultStringLength(), $this->columnDefaults->getDefaultStringCharset());
			}
		}
		
		if (!$this->hasIndexForColumn($dbInfo->getTable(), $joinColumnName)) {
			$dbInfo->getTable()->createIndex(IndexType::INDEX, array($joinColumnName));
		}
	}
{@inheritDoc}
@see \hangar\api\HangarPropDef::applyDbMeta()