private function getOrderQuery($locale)
    {
        $qb = $this->createQueryBuilder('o')
            ->leftJoin('o.deliveryAddress', 'deliveryAddress')
            ->leftJoin('o.invoiceAddress', 'invoiceAddress')
            ->leftJoin('o.status', 'status')
            ->leftJoin('status.translations', 'statusTranslations', 'WITH', 'statusTranslations.locale = :locale')
            ->leftJoin('o.items', 'items')
            ->setParameter('locale', $locale);

        return $qb;
    }
private function getOrderQuery($locale)
    {
        $qb = $this->createQueryBuilder('o')
            ->leftJoin('o.deliveryAddress', 'deliveryAddress')
            ->leftJoin('o.invoiceAddress', 'invoiceAddress')
            ->leftJoin('o.status', 'status')
            ->leftJoin('status.translations', 'statusTranslations', 'WITH', 'statusTranslations.locale = :locale')
            ->leftJoin('o.items', 'items')
            ->setParameter('locale', $locale);

        return $qb;
    }
private function getOrderQuery ( $ locale ) { $ qb = $ this -> createQueryBuilder ( 'o' ) -> leftJoin ( 'o.deliveryAddress' , 'deliveryAddress' ) -> leftJoin ( 'o.invoiceAddress' , 'invoiceAddress' ) -> leftJoin ( 'o.status' , 'status' ) -> leftJoin ( 'status.translations' , 'statusTranslations' , 'WITH' , 'statusTranslations.locale = :locale' ) -> leftJoin ( 'o.items' , 'items' ) -> setParameter ( 'locale' , $ locale ) ; return $ qb ; }
Returns query for orders.

@param string $locale The locale to load

@return \Doctrine\ORM\QueryBuilder
Returns query for orders .