diff --git a/callback_create.go b/callback_create.go index 52858a41..47b6ef96 100644 --- a/callback_create.go +++ b/callback_create.go @@ -65,7 +65,7 @@ func Create(scope *Scope) { } } - if !scope.HasError() { + if !scope.HasError() && scope.PrimaryKeyZero() { scope.SetColumn(scope.PrimaryKey(), id) } }