Bug #4755

findAll() does not return the just before added item.

Added by Falk Kühnel almost 6 years ago. Updated almost 5 years ago.

Status:Resolved Start date:2009-09-24
Priority:Must have Due date:
Assigned To:Karsten Dambekalns % Done:

100%

Category:Persistence
Target version:TYPO3 Flow Base Distribution - 1.0 alpha 5
PHP Version: Complexity:
Has patch: Affected Flow version:

Description

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.

Associated revisions

Revision 4e90b2af
Added by Karsten Dambekalns almost 6 years ago

[~TASK] FLOW3 (Documentation): Added explanation of add/retrieve behaviour in persistence repositories to the manual, fixes #4755.

History

#1 Updated by Karsten Dambekalns almost 6 years ago

  • Status changed from New to Accepted
  • Assigned To set to Karsten Dambekalns
  • Target version set to 1.0 alpha 5

Just a sidenote: for generating fake data, try Faker...

#2 Updated by Falk Kühnel almost 6 years ago

Oh, i havent seen Faker yet. Thanks for the hint. Saves quite some work with dummy data ;)

#3 Updated by Karsten Dambekalns almost 6 years ago

This is not a bug but intended behaviour. I'll add an explanation to the persistence chapter of the FLOW3 manual.

#4 Updated by Falk Kühnel almost 6 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 :)

#5 Updated by Karsten Dambekalns almost 6 years ago

  • Status changed from Accepted to Resolved
  • % Done changed from 0 to 100

Applied in changeset r3238.

Also available in: Atom PDF