public function getUpdateSql($fieldsToUpdate)
    {
        $sql = "UPDATE `".$this->schemaName."` AS `".$this->getAlias()."`";

        foreach($this->joins as $join){
            $sql .= " ".$join->joinType." (".$join->getSql($this).") AS `".$join->statement->getAlias()."` ON `".$this->getAlias()."`.`".
                $join->parentColumn."` = `".$join->statement->getAlias()."`.`".$join->childColumn."`";
        }

        $sets = [];

        foreach ($fieldsToUpdate as $key) {
            $paramName = "Update" . $key;

            $sets[] = "`".$this->getAlias()."`.`" . $key . "` = :" . $paramName;
        }

        $sql .= " SET ".implode(",", $sets);

        if ($this->whereExpression) {
            $sql .= " WHERE ".$this->whereExpression->getWhereSql($this);
        }

        return $sql;
    }