config service: update key name too when setting config

The collation is case insensitive but the client properties are case sensitive. If the case of a key changes, the client will attempt to update it in the config, but will instead overwrite the old one in the service.
This commit is contained in:
Adam
2018-08-05 11:47:38 -04:00
parent 2b0e286063
commit 8610c488ba

View File

@@ -126,7 +126,7 @@ public class ConfigService
try (Connection con = sql2o.open())
{
con.createQuery("insert into config (user, `key`, value) values (:user, :key, :value) on duplicate key update value = :value")
con.createQuery("insert into config (user, `key`, value) values (:user, :key, :value) on duplicate key update `key` = :key, value = :value")
.addParameter("user", session.getUser())
.addParameter("key", key)
.addParameter("value", value != null ? value : "")