[Flow] Re: Query to get all

Patric Eckhart mail at patriceckhart.com
Mon Mar 23 19:58:27 CET 2015


I have tried this, but the result is a blank page.
When I remove the While Loop and add a ->getFirst() behind the execute() it works, but only with one dataset.

public function exportAction(\MyProject\Portal\Domain\Model\Object $object) {

        $classname = '\MyProject\Portal\Domain\Model\Data';
        $query = $this->createQueryForType($classname);
        $query->matching($query->contains('object', $object));
        $ergebnis = $query->execute();

        while($result = $ergebnis->currenc()){
            $energiebedarfoel = $result->getEnergiebedarfoel();
        }

        $this->view->assign('results', $energiebedarfoel);

}


More information about the Flow mailing list