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:
@@ -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 : "")
|
||||
|
||||
Reference in New Issue
Block a user