code: private function getByCountryAndCustomerQuery()
      {
          if (null === $this->byCountryAndCustomerQuery) {
              $qb = $this->getBaseQueryBuilder();
  
              $this->byCountryAndCustomerQuery = $qb
                  ->andWhere($qb->expr()->eq('r.customer', ':customer'))
                  ->getQuery()
                  ->setParameter('customer', true)
                  ->setMaxResults(1);
          }
  
          return $this->byCountryAndCustomerQuery;
      }
docs: Returns the "find one by country and customer" query.
  
  @return \Doctrine\ORM\Query