fix(db): update Returning method to accept multiple columns

This commit is contained in:
Hein
2026-05-27 14:11:20 +02:00
parent 4018af0636
commit 69cc3e2839
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -1218,8 +1218,8 @@ func (h *Handler) handleCreate(ctx context.Context, w common.ResponseWriter, dat
if provider, ok := modelValue.(common.TableNameProvider); !ok || provider.TableName() == "" {
query = query.Table(tableName)
}
query = query.Returning("*")
fields := reflection.GetSQLModelColumns(model)
query = query.Returning(fields...)
// Execute BeforeScan hooks - pass query chain so hooks can modify it
itemHookCtx := &HookContext{