[TYPO3-mvc] Repositories return empty Tx_Extbase_Persistence_QueryResults
Bastian Waidelich
bastian at typo3.org
Sat Jul 16 19:06:05 CEST 2011
Hauke Stange wrote:
Hi,
> Using my Repositories in some of my Controllers always gets me empty
> Results. For example, the findAll() method should return a bunch of
> entries in most cases but I don't even get an array containing something
> but an object of 'Tx_Extbase_Persistence_QueryResult' whose
> 'queryResult' property is empty.
Since version 1.3 Query::execute() does not actually transmit the query
to the database but instead returning a proxy object (the QueryResult).
See [1] for more details.
The db query is only executed as soon as one accesses the query result
the first time (see [2]).
> I also checked those storage PID settings. Within my page tree i've
> added the needed "Record Storage Pages" for my extension.
A good start would be to debug the actuall sql statement that was built.
HTH
Bastian
[1] http://forge.typo3.org/projects/typo3v4-mvc/wiki/QueryResult
[2]
http://git.typo3.org/TYPO3v4/CoreProjects/MVC/extbase.git?a=blob;f=Classes/Persistence/QueryResult.php;h=88027543cce939a35de93397e21ad182330bde77;hb=HEAD#l104
More information about the TYPO3-project-typo3v4mvc
mailing list