Bug #12266

AccountRepository QueryResult not reflecting correct result

Added by Soren Malling over 8 years ago. Updated over 8 years ago.

Status:
Rejected
Priority:
Should have
Category:
Persistence
Start date:
2011-01-15
Due date:
% Done:

0%

PHP Version:
Has patch:
Complexity:

Description

This might be me, misunderstanding the queryResult return of a findAll function from \F3\FLOW3\Security\AccountRepository but here goes:

Debugging the output of $this->accountRepository->findAll() (using \F3\var_dump) i get the following dump

F3\FLOW3\Persistence\QueryResult [prototype]
 dataMapper => F3\FLOW3\Persistence\DataMapper [singleton][filtered]
 persistenceManager => F3\FLOW3\Persistence\PersistenceManager [singleton][filtered]
 query => F3\FLOW3\Persistence\Query [prototype][filtered]
 queryResult => NULL

from what I see, my queryResult (the resulting objects?) is empty. But adding the "->toArray()" function (or parsing it through <f:for ..><f:debug.. in fluid) I get my expected objects.

So, from my view, it looks like resulting objects isn't attached to the queryResult property?

History

#1 Updated by Karsten Dambekalns over 8 years ago

  • Category set to Persistence
  • Status changed from New to Rejected
  • Assignee set to Karsten Dambekalns
  • Target version set to 1.0 beta 1

If you var_dump() it, the QueryResult is not initialized. If you use toArray() or iterate over the QueryResult, things will work as expected.

Also available in: Atom PDF