protected function getRelationshipValue(string $relation)
    {
        $value = $this->getEntityAttribute($relation);

        if (is_scalar($value)) {
            throw new MappingException("Entity's attribute $relation should be array, object, collection or null");
        }

        return $value;
    }
protected function getRelationshipValue(string $relation)
    {
        $value = $this->getEntityAttribute($relation);

        if (is_scalar($value)) {
            throw new MappingException("Entity's attribute $relation should be array, object, collection or null");
        }

        return $value;
    }
protected function getRelationshipValue ( string $ relation ) { $ value = $ this -> getEntityAttribute ( $ relation ) ; if ( is_scalar ( $ value ) ) { throw new MappingException ( "Entity's attribute $relation should be array, object, collection or null" ) ; } return $ value ; }
Return Entity's relationship attribute.

@param string $relation

@throws MappingException

@return mixed
Return Entity s relationship attribute .