entc/gen: fix eager-loading for m2m edges (#335)

Fixed #334
This commit is contained in:
Ariel Mashraki
2020-02-08 22:26:30 +02:00
committed by GitHub
parent c8940e6a5f
commit 48d33fde9d
15 changed files with 19 additions and 19 deletions

View File

@@ -440,7 +440,7 @@ func (uq *UserQuery) sqlAll(ctx context.Context) ([]*User, error) {
return fmt.Errorf("unexpected id value for edge-in")
}
outValue := uint64(eout.Int64)
inValue := uint64(eout.Int64)
inValue := uint64(ein.Int64)
node, ok := ids[outValue]
if !ok {
return fmt.Errorf("unexpected node id in edges: %v", outValue)
@@ -503,7 +503,7 @@ func (uq *UserQuery) sqlAll(ctx context.Context) ([]*User, error) {
return fmt.Errorf("unexpected id value for edge-in")
}
outValue := uint64(eout.Int64)
inValue := uint64(eout.Int64)
inValue := uint64(ein.Int64)
node, ok := ids[outValue]
if !ok {
return fmt.Errorf("unexpected node id in edges: %v", outValue)