[Flow] Query to get all
Carsten Bleicker
carsten at bleicker.de
Sat Mar 21 17:15:24 CET 2015
you can refactor also to this if youre running on php 5.5
> $query = $this->persistenceManager->createQueryForType(\MyCompany\MyProject\Domain\Model\Data::class);
Mit sonnigem Gruß
Carsten Bleicker
----------------------
Carsten Bleicker
Wülfingstraße 1
42477 Radevormwald
E-Mail: carsten at bleicker.de
Web: www.bleicker.de
Twitter: @carstenbleicker
Jabber: cbleicker at jabber.ccc.de
Telefon: +49 (0)171-2690845
> Am 21.03.2015 um 17:07 schrieb Patric Eckhart <mail at patriceckhart.com>:
>
> Hey,
>
> I have a function with a query, like the following:
>
> $classname = '\MyCompany\MyProject\Domain\Model\Data';
> $query = $this->persistenceManager->createQueryForType($classname);
> $csvget = $query->matching($query->equals('object', $object))->execute()->getFirst();
> $energiebedarfoel = $csvget->getEnergiebedarfoel();
>
> This works perfect, but only with the first dataset (getFirst()). I have tried this with execute()->findAll(); but it does not work.
>
> I would show all datasets with the object identifier. With getFirst I get only one - the first.
>
> Thank your for your answer.
> _______________________________________________
> Flow mailing list
> Flow at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/flow
More information about the Flow
mailing list