dialect/sql/sqlgraph: allow selecting order by terms (#3439)

This commit is contained in:
Ariel Mashraki
2023-04-04 14:00:35 +03:00
committed by GitHub
parent 4c332f7bba
commit 0e7203655e
3 changed files with 69 additions and 8 deletions

View File

@@ -2506,9 +2506,8 @@ func OrderByEdgeCount(t *testing.T, client *ent.Client) {
sqlgraph.Edge(sqlgraph.O2M, false, pet.Table, pet.OwnerColumn),
),
sqlgraph.OrderByExprDesc(nil, as),
sqlgraph.OrderBySelected(),
))
// Append the value to be scanned.
s.AppendSelect(as)
}).
AllX(ctx)
require.Equal(t, 4, len(nodes))