doc: fix example in docs/crud/#create-many (#3770)

This commit is contained in:
Adam Zapaśnik
2023-09-30 11:25:38 +03:00
committed by GitHub
parent 93d9e51e00
commit 5368e5c54e

View File

@@ -168,7 +168,7 @@ pets, err := client.Pet.CreateBulk(
names := []string{"pedro", "xabi", "layla"}
pets, err := client.Pet.MapCreateBulk(names, func(c *ent.PetCreate, i int) {
client.Pet.Create().SetName(names[i]).SetOwner(a8m)
c.SetName(names[i]).SetOwner(a8m)
}).Save(ctx)
```