feat(category): Ensure all fields, including zero values, are updated in the Update method
Deploy Application / deploy (push) Successful in 23s Details

This commit is contained in:
Habib Fatkhul Rohman 2025-11-07 13:19:04 +07:00
parent b6c0509888
commit 47f5198326
1 changed files with 1 additions and 0 deletions

View File

@ -66,6 +66,7 @@ func (r *categoryRepository) Update(ctx context.Context, tx *gorm.DB, category e
if err := tx.WithContext(ctx).
Model(&entities.MCategoryEntity{}).
Where("id = ?", category.ID).
Select("*"). // ← ini wajib agar semua field termasuk zero value diupdate
Updates(category).Error; err != nil {
return category, err
}