public function findByCollectionNameIterator($collectionName)
    {
        /** @var QueryBuilder $queryBuilder */
        $queryBuilder = $this->entityManager->createQueryBuilder();
        return $queryBuilder
            ->select('PersistentResource')
            ->from($this->getEntityClassName(), 'PersistentResource')
            ->where('PersistentResource.collectionName = :collectionName')
            ->setParameter(':collectionName', $collectionName)
            ->getQuery()->iterate();
    }
public function findByCollectionNameIterator($collectionName)
    {
        /** @var QueryBuilder $queryBuilder */
        $queryBuilder = $this->entityManager->createQueryBuilder();
        return $queryBuilder
            ->select('PersistentResource')
            ->from($this->getEntityClassName(), 'PersistentResource')
            ->where('PersistentResource.collectionName = :collectionName')
            ->setParameter(':collectionName', $collectionName)
            ->getQuery()->iterate();
    }
public function findByCollectionNameIterator ( $ collectionName ) { /** @var QueryBuilder $queryBuilder */ $ queryBuilder = $ this -> entityManager -> createQueryBuilder ( ) ; return $ queryBuilder -> select ( 'PersistentResource' ) -> from ( $ this -> getEntityClassName ( ) , 'PersistentResource' ) -> where ( 'PersistentResource.collectionName = :collectionName' ) -> setParameter ( ':collectionName' , $ collectionName ) -> getQuery ( ) -> iterate ( ) ; }
Finds all objects by collection name and return an IterableResult

@param string $collectionName
@return IterableResult
Finds all objects by collection name and return an IterableResult