From 905457964c8e54ad6ecbafe096f6ddb1d5fe3fa3 Mon Sep 17 00:00:00 2001 From: Hein Date: Thu, 21 May 2026 08:34:09 +0200 Subject: [PATCH] fix(restheadspec): remove redundant column selection in query --- pkg/restheadspec/handler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/restheadspec/handler.go b/pkg/restheadspec/handler.go index 0cd941d..d494e15 100644 --- a/pkg/restheadspec/handler.go +++ b/pkg/restheadspec/handler.go @@ -1367,7 +1367,7 @@ func (h *Handler) handleUpdate(ctx context.Context, w common.ResponseWriter, id // First, read the existing record from the database existingRecord := reflect.New(reflection.GetPointerElement(reflect.TypeOf(model))).Interface() - selectQuery := tx.NewSelect().Model(existingRecord).Column("*").Where(fmt.Sprintf("%s = ?", common.QuoteIdent(pkName)), targetID) + selectQuery := tx.NewSelect().Model(existingRecord).Where(fmt.Sprintf("%s = ?", common.QuoteIdent(pkName)), targetID) if err := selectQuery.ScanModel(ctx); err != nil { if err == sql.ErrNoRows { return fmt.Errorf("record not found with ID: %v", targetID)