public function set($name, $value)
    {
        //If it's an object, save its ID as the parameter
        if(is_object($value) && method_exists($value, 'getId'))
        {
            $this->parameters[$name] = $value->getId();
        }

        //Just save the parameter
        else
        {
            $this->parameters[$name] = $value;
        }

        return $this;
    }