public function update($query, array $options = []) {
		$params = compact('query', 'options');

		return Filters::run($this, __FUNCTION__, $params, function($params) {
			$query = $params['query'];
			$exportedQuery = $query->export($this);

			if ($exportedQuery['fields'] === null) {
				return true;
			}

			$sql = $this->renderCommand('update', $exportedQuery, $query);
			$result = (boolean) $this->_execute($sql);

			if ($result && is_object($query) && $query->entity()) {
				$query->entity()->sync();
			}
			return $result;
		});
	}
public function update($query, array $options = []) {
		$params = compact('query', 'options');

		return Filters::run($this, __FUNCTION__, $params, function($params) {
			$query = $params['query'];
			$exportedQuery = $query->export($this);

			if ($exportedQuery['fields'] === null) {
				return true;
			}

			$sql = $this->renderCommand('update', $exportedQuery, $query);
			$result = (boolean) $this->_execute($sql);

			if ($result && is_object($query) && $query->entity()) {
				$query->entity()->sync();
			}
			return $result;
		});
	}
public function update ( $ query , array $ options = [ ] ) { $ params = compact ( 'query' , 'options' ) ; return Filters :: run ( $ this , __FUNCTION__ , $ params , function ( $ params ) { $ query = $ params [ 'query' ] ; $ exportedQuery = $ query -> export ( $ this ) ; if ( $ exportedQuery [ 'fields' ] === null ) { return true ; } $ sql = $ this -> renderCommand ( 'update' , $ exportedQuery , $ query ) ; $ result = ( boolean ) $ this -> _execute ( $ sql ) ; if ( $ result && is_object ( $ query ) && $ query -> entity ( ) ) { $ query -> entity ( ) -> sync ( ) ; } return $ result ; } ) ; }
Updates a record in the database based on the given `Query`.

@param object $query A `lithium\data\model\Query` object
@param array $options none
@return boolean
@filter
Updates a record in the database based on the given Query .