dialect/sql/sqlgraph: prefix entql idents with table/select name (#1592)

This commit is contained in:
Ariel Mashraki
2021-05-23 18:12:16 +03:00
committed by GitHub
parent af73543265
commit b46a6f0d69
2 changed files with 12 additions and 12 deletions

View File

@@ -273,7 +273,7 @@ func (e *state) evalEdge(name string, exprs ...entql.Expr) *sql.Predicate {
func (e *state) field(f *entql.Field) string {
_, ok := e.context.Fields[f.Name]
expect(ok || e.context.ID.Column == f.Name, "field %q was not found for node %q", f.Name, e.context.Type)
return f.Name
return e.selector.C(f.Name)
}
func args(b *sql.Builder, v *entql.Value) {