findAll() does not return the just before added item.
When adding an item to a repository and immediately thereafter calling the findAll() method, the just added items are not returned.
$customer = $this->objectFactory->create('F3\Projects\Domain\Model\Customer'); $customer->setFirstName($this->rand_str(rand(5,32))); $customer->setLastName($this->rand_str(rand(5,32))); $this->customerRepository->add($customer); $this->view->assign('customers', $this->customerRepository->findAll());
Happens with revision 3915 on windows vista. Havent tried anything else.
Updated by Falk Kühnel about 12 years ago
Karsten Dambekalns wrote:
This is not a bug but intended behaviour. I'll add an explanation to the persistence chapter of the FLOW3 manual.
Very confusing. Why is it intended? I personally would expect to retrieve all Items from the Repository, even the ones, that did not yet get persisted. Cant wait for that chapter :)