LazyRecord\BaseModel::rawUpdate PHP Method

rawUpdate() public method

Simply update record without validation and triggers.
public rawUpdate ( array $args )
$args array
    public function rawUpdate(array $args)
    {
        $dsId = $this->writeSourceId;
        $conn = $this->getWriteConnection();
        $driver = $this->getWriteQueryDriver();
        $k = static::PRIMARY_KEY;
        $kVal = isset($args[$k]) ? $args[$k] : isset($this->_data[$k]) ? $this->_data[$k] : null;
        $arguments = new ArgumentArray();
        $query = new UpdateQuery();
        $query->set($args);
        $query->update($this->table);
        $query->where()->equal($k, $kVal);
        $sql = $query->toSql($driver, $arguments);
        $stm = $conn->prepare($sql);
        $stm->execute($arguments->toArray());
        // update current data stash
        $this->_data = array_merge($this->_data, $args);
        return $this->reportSuccess('Update success', array('sql' => $sql, 'type' => Result::TYPE_UPDATE));
    }