public function getOwner($relatedClass, $foreignKey = '')
    {
        if (!$foreignKey) {
            $column = $relatedClass::getTable();
        } else {
            $column = $foreignKey;
        }
        return static::wrap($this->fetchAs($relatedClass)->$column, $relatedClass);
    }
public function getOwner($relatedClass, $foreignKey = '')
    {
        if (!$foreignKey) {
            $column = $relatedClass::getTable();
        } else {
            $column = $foreignKey;
        }
        return static::wrap($this->fetchAs($relatedClass)->$column, $relatedClass);
    }
public function getOwner ( $ relatedClass , $ foreignKey = '' ) { if ( ! $ foreignKey ) { $ column = $ relatedClass :: getTable ( ) ; } else { $ column = $ foreignKey ; } return static :: wrap ( $ this -> fetchAs ( $ relatedClass ) -> $ column , $ relatedClass ) ; }
Get one-to-many relationship
@param Model $relatedClass
@param type $foreignKey
Get one - to - many relationship