summaryrefslogtreecommitdiff
path: root/vendor/github.com/uptrace/bun/model_table_struct.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/uptrace/bun/model_table_struct.go')
-rw-r--r--vendor/github.com/uptrace/bun/model_table_struct.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/vendor/github.com/uptrace/bun/model_table_struct.go b/vendor/github.com/uptrace/bun/model_table_struct.go
index fadc9284c..65e076d23 100644
--- a/vendor/github.com/uptrace/bun/model_table_struct.go
+++ b/vendor/github.com/uptrace/bun/model_table_struct.go
@@ -8,6 +8,7 @@ import (
"strings"
"time"
+ "github.com/uptrace/bun/internal"
"github.com/uptrace/bun/schema"
)
@@ -234,7 +235,7 @@ func (m *structTableModel) parentIndex() []int {
}
func (m *structTableModel) mount(host reflect.Value) {
- m.strct = host.FieldByIndex(m.rel.Field.Index)
+ m.strct = internal.FieldByIndexAlloc(host, m.rel.Field.Index)
m.structInited = false
}