public function relation($relationName)
    {
        if (!$relation = $this->findRelationByName($relationName)) {
            throw new ModelException(sprintf('Unknown relation, relation "%s" not found in model "%s"', $relationName, $this->entity));
        }

        return $relation;
    }
public function relation($relationName)
    {
        if (!$relation = $this->findRelationByName($relationName)) {
            throw new ModelException(sprintf('Unknown relation, relation "%s" not found in model "%s"', $relationName, $this->entity));
        }

        return $relation;
    }
public function relation ( $ relationName ) { if ( ! $ relation = $ this -> findRelationByName ( $ relationName ) ) { throw new ModelException ( sprintf ( 'Unknown relation, relation "%s" not found in model "%s"' , $ relationName , $ this -> entity ) ) ; } return $ relation ; }
Returns relation definition for passed entity class

@param string $relationName

@return RelationInterface
@throws ModelException
Returns relation definition for passed entity class