public function getRelation()
    {
        if (!$this->relatedTableName) {
            return null;
        }
        foreach ($this->getTable()->getRelations() as $name => $relation) {
            if ($relation->getType() == RelationMap::MANY_TO_ONE) {
                if ($relation->getForeignTable()->getName() == $this->getRelatedTableName() && array_key_exists($this->getFullyQualifiedName(), $relation->getColumnMappings())) {
                    return $relation;
                }
            }
        }
    }
public function getRelation()
    {
        if (!$this->relatedTableName) {
            return null;
        }
        foreach ($this->getTable()->getRelations() as $name => $relation) {
            if ($relation->getType() == RelationMap::MANY_TO_ONE) {
                if ($relation->getForeignTable()->getName() == $this->getRelatedTableName() && array_key_exists($this->getFullyQualifiedName(), $relation->getColumnMappings())) {
                    return $relation;
                }
            }
        }
    }
public function getRelation ( ) { if ( ! $ this -> relatedTableName ) { return null ; } foreach ( $ this -> getTable ( ) -> getRelations ( ) as $ name => $ relation ) { if ( $ relation -> getType ( ) == RelationMap :: MANY_TO_ONE ) { if ( $ relation -> getForeignTable ( ) -> getName ( ) == $ this -> getRelatedTableName ( ) && array_key_exists ( $ this -> getFullyQualifiedName ( ) , $ relation -> getColumnMappings ( ) ) ) { return $ relation ; } } } }
Get the RelationMap object for this foreign key

@return RelationMap|null
Get the RelationMap object for this foreign key