mirror of
https://github.com/bitechdev/ResolveSpec.git
synced 2026-01-03 02:14:25 +00:00
Fixed models being icorrectly set and added SetDefaultRegistry
This commit is contained in:
@@ -811,7 +811,7 @@ func (h *Handler) handleUpdate(ctx context.Context, w common.ResponseWriter, id
|
||||
dataMap["id"] = targetID
|
||||
|
||||
// Create update query
|
||||
query := tx.NewUpdate().Model(model).Table(tableName).SetMap(dataMap)
|
||||
query := tx.NewUpdate().Table(tableName).SetMap(dataMap)
|
||||
pkName := reflection.GetPrimaryKeyName(model)
|
||||
query = query.Where(fmt.Sprintf("%s = ?", common.QuoteIdent(pkName)), targetID)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user