Multiple flushes do not behave as expected
Open
bug
- Dominant language
- PHP
- Stars
- 8
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
```
$dal = Container::make('dal.manager');
foreach (['a', 'b'] as $n) {
foreach ([1, 2, 3, 4, 5] as $i) {
$recipe = new Recipe();
$recipe->setName($n . $i);
$dal->persist($recipe);
$dal->flush();
}
}
$repository = $dal->getRepository('Graze\Lib\Entity\Product\Recipe');
dump($repository->findAll());
```
This inserts only b4 and b5, if I move the flush to after the for each loop, i.e. just one flush, it inserts all records as expected.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.