entc/gen: avoid ambiguous column names when joining the same table (#3461)

This commit is contained in:
Ariel Mashraki
2023-04-10 06:29:17 +03:00
committed by GitHub
parent 36d16536ea
commit 065cb9f9ff
44 changed files with 69 additions and 69 deletions

View File

@@ -414,7 +414,7 @@ func (uq *UserQuery) loadCard(ctx context.Context, query *CardQuery, nodes []*Us
}
query.withFKs = true
query.Where(predicate.Card(func(s *sql.Selector) {
s.Where(sql.InValues(user.CardColumn, fks...))
s.Where(sql.InValues(s.C(user.CardColumn), fks...))
}))
neighbors, err := query.All(ctx)
if err != nil {