mirror of
https://github.com/ent/ent.git
synced 2026-03-05 19:35:23 +03:00
doc: fix example in docs/crud/#create-many (#3770)
This commit is contained in:
@@ -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)
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user