Sprig_Core::related PHP Method

    public function related($name, $value)
    {
        if (!isset($this->_fields[$name]) or !$this->_fields[$name] instanceof Sprig_Field_HasMany) {
            throw new Sprig_Exception('Unknown relationship: :name', array(':name' => $name));
        }
        // Make sure the field is accessed to load it's values
        $this->{$name};
        return in_array($value, $this->_original[$name]);
    }