public function setRelated($model = null, $data = null, $id = null)
    {
        if (!empty($model) && !empty($data)) {
            if (!empty($id)) {
                if (!isset($this->data[$model]))
                    $this->data[$model] = array();
                if (!is_array($this->data[$model]))
                    $this->data[$model] = array_filter( array( $this->data[$model] ) );
                $this->data[$model][$id] = $data;
            } else
                $this->data[$model] = $data;
        }
    }