public function getRelation($name)
    {
        if (array_key_exists($name, $this->relation_objects)) {
            return $this->relation_objects[$name];
        }

        $relation = self::getRelationDefinition($name);

        $this->relation_objects[$name] = $this->fetchRelation($relation);

        return $this->relation_objects[$name];
    }
public function getRelation($name)
    {
        if (array_key_exists($name, $this->relation_objects)) {
            return $this->relation_objects[$name];
        }

        $relation = self::getRelationDefinition($name);

        $this->relation_objects[$name] = $this->fetchRelation($relation);

        return $this->relation_objects[$name];
    }
public function getRelation ( $ name ) { if ( array_key_exists ( $ name , $ this -> relation_objects ) ) { return $ this -> relation_objects [ $ name ] ; } $ relation = self :: getRelationDefinition ( $ name ) ; $ this -> relation_objects [ $ name ] = $ this -> fetchRelation ( $ relation ) ; return $ this -> relation_objects [ $ name ] ; }
Get the named related object. If the database has not been
queried it will be fetched automatically. If the database has
been queried the original result will be returned.

@param string $name The name of the relation
Get the named related object . If the database has not been queried it will be fetched automatically . If the database has been queried the original result will be returned .