public function addRelationship($id, $relationship, $related_id, $type = false)
    {
        foreach ($this->data as $key => $data) {
            if ($data->getId() == $id) {
                $this->data[$key]->addRelationship($relationship, $related_id, $type);
                return true;
            }
        }
        return false;
    }
public function addRelationship($id, $relationship, $related_id, $type = false)
    {
        foreach ($this->data as $key => $data) {
            if ($data->getId() == $id) {
                $this->data[$key]->addRelationship($relationship, $related_id, $type);
                return true;
            }
        }
        return false;
    }
public function addRelationship ( $ id , $ relationship , $ related_id , $ type = false ) { foreach ( $ this -> data as $ key => $ data ) { if ( $ data -> getId ( ) == $ id ) { $ this -> data [ $ key ] -> addRelationship ( $ relationship , $ related_id , $ type ) ; return true ; } } return false ; }
for a supplied primary id and related id, create a relationship

@param $id - the id of the primary record
@param $relationship
@param $related_id - the primary id of the related record
@type mixed $type just pass through to data
@return boolean
for a supplied primary id and related id create a relationship