$query= $this->
->createQueryBuilder()
->select('b, users')
->from(B::class, 'b')
->join('b.users', 'users')
->where('b.id = :id')
->setParameter('id', $id)
->getQuery();
public function updatePassword($plainPassword, EncoderInterface $encoder) {
//...
}
public function updateProfile(UserProfile $profile) {
//...
}