$qbRows = $this
->createQueryBuilder('b')
->where('b.id = ' . (int) $id)
->select('b.id')
->addSelect('b.name')
->addSelect('b.Users')
->getQuery();
$query= $this->
->createQueryBuilder()
->select('b, users')
->from(B::class, 'b')
->join('b.users', 'users')
->where('b.id = :id')
->setParameter('id', $id)
->getQuery();