Есть код:
$em = $this->getServiceLocator()->get(EntityManager::class);
$qb = $em->createQueryBuilder();
$qb->update(ReCall::class, 'rc')
->innerJoin(CallChannel::class, 'ch', Join::WITH, 'rc.call = ch.call')
->set('rc.reached', '1')
->where('rc.reached = 0 AND ch.shoulder = \'A\' AND ch.callerPhone = :phone')
->setParameter('phone', $channel->getCallerPhone());
$qb->getQuery()->getResult();
Есть ошибка:
[Semantical Error] line 0, col 79 near 'ch.shoulder =': Error: 'ch' is not defined.Call not found
Подобная конструкция, которая работает
$em = $this->getServiceLocator()->get(EntityManager::class);
$qb = $em->createQueryBuilder();
$qb->select('rc')
->from(ReCall::class, 'rc')
->where('rc.reached = 0 AND ch.shoulder = \'A\' AND ch.callerPhone = :phone')
->setParameter('phone', $callerPhone)
->innerJoin(CallChannel::class, 'ch', Join::WITH, 'rc.call = ch.call')
->orderBy('rc.createdDatetime');
$data = $qb->getQuery()->getResult();