[TYPO3-mvc] type-Exception bei eigener findAll-Methode
Christian Essl
essl at incert.at
Thu Sep 29 13:19:08 CEST 2011
Thanks, I really must be blind...
-----Ursprüngliche Nachricht-----
Von: typo3-project-typo3v4mvc-bounces at lists.typo3.org [mailto:typo3-project-typo3v4mvc-bounces at lists.typo3.org] Im Auftrag von Dennis Ahrens
Gesendet: Donnerstag, 29. September 2011 12:32
An: typo3-project-typo3v4mvc at lists.typo3.org
Betreff: Re: [TYPO3-mvc] type-Exception bei eigener findAll-Methode
Hi Christian,
for further communication: the language of this list is english.
> Nun habe ich nachgeforscht, welcher Code-Teil dieses Type-Problem auslöst und bin darauf gestoßen, dass:
> $result = $this->createQuery()->execute();
>
> aus der Original-Methode keine Probleme bereitet, sobald ich diese Kurzform aber in 2 Teile teile:
> $result = $this->createQuery(); $result->execute();
in case one you assign the return value of execute() to the variable $result. $result is an array in this case (if you use an older version of extbase)
in case two you just call the method on $result and do *not* assign the return value into the variable. $result is an object of type Tx_Extbase_Persistence_Query in this case.
$result = $result->execute(); or return $result->execute(); will help you out.
regards
Dennis
_______________________________________________
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