Skip to content

Commit

Permalink
fix setupValuerAndSetter
Browse files Browse the repository at this point in the history
  • Loading branch information
KEHyeon committed Feb 15, 2025
1 parent 0d18339 commit 009bf69
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions schema/field.go
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,9 @@ func (field *Field) setupValuerAndSetter() {
default:
field.ValueOf = func(ctx context.Context, v reflect.Value) (interface{}, bool) {
v = reflect.Indirect(v)
if v.Kind() == reflect.Interface {
v = reflect.Indirect(v)
}
for _, fieldIdx := range field.StructField.Index {
if fieldIdx >= 0 {
v = v.Field(fieldIdx)
Expand Down

0 comments on commit 009bf69

Please sign in to comment.