EntityRepositoryHelperTrait.php
public function findAllRoot($indexBy = null): iterable
    {
        $this->checkRepository();

        $data = $this->createQueryBuilder('object')
            ->getQuery()
            ->getResult()
        ;

        if ($data && $indexBy) {
            $data = $this->sortCollection($data, $indexBy);
        }

        return $data;
    }
public function findAllRoot($indexBy = null): iterable
    {
        $this->checkRepository();

        $data = $this->createQueryBuilder('object')
            ->getQuery()
            ->getResult()
        ;

        if ($data && $indexBy) {
            $data = $this->sortCollection($data, $indexBy);
        }

        return $data;
    }
public function findAllRoot ( $ indexBy = null ) : iterable { $ this -> checkRepository ( ) ; $ data = $ this -> createQueryBuilder ( 'object' ) -> getQuery ( ) -> getResult ( ) ; if ( $ data && $ indexBy ) { $ data = $ this -> sortCollection ( $ data , $ indexBy ) ; } return $ data ; }
Finds all objects and retrieve only "root" objects, without their associated relatives.
This prevends potential "fetch=EAGER" to be thrown.
Finds all objects and retrieve only root objects without their associated relatives . This prevends potential fetch = EAGER to be thrown .