diff options
Diffstat (limited to 'vendor/github.com/uptrace/bun/schema/table.go')
-rw-r--r-- | vendor/github.com/uptrace/bun/schema/table.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/vendor/github.com/uptrace/bun/schema/table.go b/vendor/github.com/uptrace/bun/schema/table.go index 9791f8ff1..ed8c517c1 100644 --- a/vendor/github.com/uptrace/bun/schema/table.go +++ b/vendor/github.com/uptrace/bun/schema/table.go @@ -287,17 +287,17 @@ func (t *Table) processBaseModelField(f reflect.StructField) { } } -//nolint +// nolint func (t *Table) newField(f reflect.StructField, prefix string, index []int) *Field { tag := tagparser.Parse(f.Tag.Get("bun")) - if prefix, ok := tag.Option("embed"); ok { + if nextPrefix, ok := tag.Option("embed"); ok { fieldType := indirectType(f.Type) if fieldType.Kind() != reflect.Struct { panic(fmt.Errorf("bun: embed %s.%s: got %s, wanted reflect.Struct", t.TypeName, f.Name, fieldType.Kind())) } - t.addFields(fieldType, prefix, withIndex(index, f.Index)) + t.addFields(fieldType, prefix+nextPrefix, withIndex(index, f.Index)) return nil } |