diff options
author | 2023-09-11 15:16:52 +0200 | |
---|---|---|
committer | 2023-09-11 15:16:52 +0200 | |
commit | 7011f57b09fc03bde9d48fef191e904110c09c4b (patch) | |
tree | 1118192d6c8d49715d2293ee19c79e50b89de64e /vendor/github.com/uptrace/bun/relation_join.go | |
parent | [chore]: Bump golang.org/x/net from 0.14.0 to 0.15.0 (#2193) (diff) | |
download | gotosocial-7011f57b09fc03bde9d48fef191e904110c09c4b.tar.xz |
[chore] bump bun v1.1.14 -> v1.1.15 (#2195)
Diffstat (limited to 'vendor/github.com/uptrace/bun/relation_join.go')
-rw-r--r-- | vendor/github.com/uptrace/bun/relation_join.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/vendor/github.com/uptrace/bun/relation_join.go b/vendor/github.com/uptrace/bun/relation_join.go index 200f6758a..87503fbeb 100644 --- a/vendor/github.com/uptrace/bun/relation_join.go +++ b/vendor/github.com/uptrace/bun/relation_join.go @@ -178,7 +178,12 @@ func (j *relationJoin) m2mQuery(q *SelectQuery) *SelectQuery { baseTable := j.BaseModel.Table() if j.Relation.M2MTable != nil { - q = q.ColumnExpr(string(j.Relation.M2MTable.SQLAlias) + ".*") + fields := append(j.Relation.M2MBaseFields, j.Relation.M2MJoinFields...) + + b := make([]byte, 0, len(fields)) + b = appendColumns(b, j.Relation.M2MTable.SQLAlias, fields) + + q = q.ColumnExpr(internal.String(b)) } //nolint |