[TYPO3-mvc] Cannot get findByProperty to work

Henjo Hoeksma me at henjohoeksma.nl
Mon Jan 2 16:17:56 CET 2012


Hi Claus, thanks for the clear explanation!

Kind regards,

Henjo

Problems are small because we learned how to deal with them.
Problems are big because we need to learn how to deal with them.


On Mon, Jan 2, 2012 at 13:59, Claus Due <claus at wildside.dk> wrote:

> Hi Mark, Henjo,
>
> > when you use the magic of the findByProperty methods, keep in mind the
> > return will be an object storage (unless you return them specifically as
> an
> > array - like you did with Franz' snippet).
>
> Actually it wil be a QueryResult, not an ObjectStorage, which means it
> will not have been executed yet (->toArray() executes the QueryResult
> first). These QueryResults can be used in Paginate Widgets for example, to
> manipulate the QueryResult's query settings before it actually gets
> executed.
>
> If you want Pagination or other QueryResult features naturally you should
> adapt your code instead of using ->toArray(). You should consider
> ->toArray() a fallback to be used only in cases where a QueryResult
> definitely cannot be supported.
>
> Cheers,
> Claus
> _______________________________________________
> TYPO3-project-typo3v4mvc mailing list
> TYPO3-project-typo3v4mvc at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc
>


More information about the TYPO3-project-typo3v4mvc mailing list