correctly handle structs with embedded fields

This commit is contained in:
Hein
2025-11-20 09:28:37 +02:00
parent 66b6a0d835
commit 35089f511f
4 changed files with 429 additions and 41 deletions

View File

@@ -10,7 +10,7 @@ import (
type TestModel struct {
ID int64 `json:"id" bun:"id,pk"`
Name string `json:"name" bun:"name"`
RowNumber int64 `json:"_rownumber,omitempty" gorm:"-" bun:"-"`
RowNumber int64 `json:"_rownumber,omitempty" gorm:"-" bun:",scanonly"`
}
func TestSetRowNumbersOnRecords(t *testing.T) {