diff --git a/callback_update.go b/callback_update.go index 0e32352f..f6c1e0a4 100644 --- a/callback_update.go +++ b/callback_update.go @@ -52,6 +52,9 @@ func Update(scope *Scope) { if field.DefaultValue != nil && field.IsBlank { continue } + if field.Name == "CreatedAt" { + continue + } sqls = append(sqls, fmt.Sprintf("%v = %v", scope.Quote(field.DBName), scope.AddToVars(field.Field.Interface()))) } }