summaryrefslogtreecommitdiff
path: root/vendor/github.com/uptrace/bun/schema
diff options
context:
space:
mode:
authorLibravatar kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com>2025-03-10 19:40:16 +0000
committerLibravatar GitHub <noreply@github.com>2025-03-10 19:40:16 +0000
commitbad12a62e60bacf5222e39e26f7da97fdea23c15 (patch)
treecd132c66b3a88dac3af27df77c71891a2bc89fa1 /vendor/github.com/uptrace/bun/schema
parent[chore] add warning message when wazero compiler not supported (#3894) (diff)
downloadgotosocial-bad12a62e60bacf5222e39e26f7da97fdea23c15.tar.xz
bumps our uptrace/bun dependencies to v1.2.11 (#3895)
Diffstat (limited to 'vendor/github.com/uptrace/bun/schema')
-rw-r--r--vendor/github.com/uptrace/bun/schema/table.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/vendor/github.com/uptrace/bun/schema/table.go b/vendor/github.com/uptrace/bun/schema/table.go
index cf9f49197..93313597b 100644
--- a/vendor/github.com/uptrace/bun/schema/table.go
+++ b/vendor/github.com/uptrace/bun/schema/table.go
@@ -171,7 +171,7 @@ func (t *Table) processFields(typ reflect.Type) {
if _, ok := ebdStructs[k]; !ok {
ebdStructs[k] = &structField{
Index: makeIndex(sf.Index, v.Index),
- Table: subtable,
+ Table: v.Table,
}
}
}
@@ -259,13 +259,13 @@ func (t *Table) processFields(typ reflect.Type) {
}
for _, embfield := range embedded {
- subfield := embfield.subfield.Clone()
-
- if ambiguousNames[subfield.Name] > 1 &&
- !(!subfield.Tag.IsZero() && ambiguousTags[subfield.Name] == 1) {
+ if ambiguousNames[embfield.prefix+embfield.subfield.Name] > 1 &&
+ !(!embfield.subfield.Tag.IsZero() && ambiguousTags[embfield.prefix+embfield.subfield.Name] == 1) {
continue // ambiguous embedded field
}
+ subfield := embfield.subfield.Clone()
+
subfield.Index = makeIndex(embfield.index, subfield.Index)
if embfield.prefix != "" {
subfield.Name = embfield.prefix + subfield.Name