propagate context to From selector in (*query).selector (#4501)

This commit is contained in:
Michael Caulley
2026-05-15 17:48:22 -04:00
committed by GitHub
parent 1391816b77
commit 0a61da2fa2
2 changed files with 8 additions and 0 deletions

View File

@@ -1070,6 +1070,7 @@ func (q *query) selector(ctx context.Context) (*sql.Selector, error) {
WithContext(ctx)
if q.From != nil {
selector = q.From
selector.WithContext(ctx)
}
selector.Select(selector.Columns(q.Node.Columns...)...)
if order := q.Order; order != nil {