[bugfix] Fixed an issue that generated potential wrong SQL queries

This commit prevents the other keys to be empty during an
UPDATE query.