src/Brick/User/UserProfileRepository.php
public function update($id = 0, $data = [])
	{
		try {
			$this->database->query("UPDATE user_profile SET ? WHERE user_id = ?", $data, $id);

		} catch (\PDOException $e) {
			if ($e->getCode() == '23000') {
				throw new DuplicateEntryException;
			} else {
				throw $e;
			}
		}

		return $this->getBy('user_id', $id);
	}
public function update($id = 0, $data = [])
	{
		try {
			$this->database->query("UPDATE user_profile SET ? WHERE user_id = ?", $data, $id);

		} catch (\PDOException $e) {
			if ($e->getCode() == '23000') {
				throw new DuplicateEntryException;
			} else {
				throw $e;
			}
		}

		return $this->getBy('user_id', $id);
	}
@param int $id
@param array $data

@return \Nette\Database\Table\IRow
@throws DuplicateEntryException