feat: fix the bug that sycner does not initialize (#1924)

This commit is contained in:
Yaodong Yu
2023-06-03 00:15:28 +08:00
committed by GitHub
parent ed688efdbb
commit ec3c24ba68
2 changed files with 7 additions and 10 deletions

View File

@ -107,7 +107,7 @@ func (syncer *Syncer) updateUser(user *OriginalUser) (bool, error) {
delete(m, syncer.TablePrimaryKey)
setString := syncer.getSqlSetStringFromMap(m)
sql := fmt.Sprintf("update %s set %s where %s = %s", syncer.getTable(), setString, syncer.TablePrimaryKey, pkValue)
sql := fmt.Sprintf("update %s set %s where %s = '%s'", syncer.getTable(), setString, syncer.TablePrimaryKey, pkValue)
res, err := syncer.Adapter.Engine.Exec(sql)
if err != nil {
return false, err