Bridge/Doctrine/ORM/Repository/AbstractSaleRepository.php
protected function loadLines(SaleInterface $sale)
    {
        if (null !== $sale) {
            $qb = $this->createQueryBuilder('o');
            $qb
                ->select('PARTIAL o.{id}', 'item', 'adjustment', 'sub_item', 'sub_adjustment')
                ->leftJoin('o.items', 'item')
                ->leftJoin('item.adjustments', 'adjustment')
                ->leftJoin('item.children', 'sub_item')
                ->leftJoin('sub_item.adjustments', 'sub_adjustment')
                ->andWhere($qb->expr()->eq('o.id', ':id'))
                ->getQuery()
                ->useQueryCache(true)
                ->setParameter('id', $sale->getId())
                ->getResult();
        }

        return $this;
    }
protected function loadLines(SaleInterface $sale)
    {
        if (null !== $sale) {
            $qb = $this->createQueryBuilder('o');
            $qb
                ->select('PARTIAL o.{id}', 'item', 'adjustment', 'sub_item', 'sub_adjustment')
                ->leftJoin('o.items', 'item')
                ->leftJoin('item.adjustments', 'adjustment')
                ->leftJoin('item.children', 'sub_item')
                ->leftJoin('sub_item.adjustments', 'sub_adjustment')
                ->andWhere($qb->expr()->eq('o.id', ':id'))
                ->getQuery()
                ->useQueryCache(true)
                ->setParameter('id', $sale->getId())
                ->getResult();
        }

        return $this;
    }
Loads the sale lines (items / adjustments).

@param SaleInterface $sale

@return $this|AbstractSaleRepository