如何更新已连接的两个表的字段。 它显示错误。
消息":" [语义错误]第0行,第271页附近' a.artisanName': 错误:' a'未定义。",
"class": "Doctrine\\ORM\\Query\\QueryException",
$query = $qb->update("MainBundle:ArtisanUser", 'au')
->join("au.Artisan", 'a')
->set('au.firstName', $qb->expr()->literal($parameter['params']['firstName']))
->set('au.lastName', $qb->expr()->literal($parameter['params']['lastName']))
->set('au.email', $qb->expr()->literal($parameter['params']['email']))
->set('au.dateOfBirth', $qb->expr()->literal($dob))
->set('au.gender', $qb->expr()->literal($parameter['params']['gender']))
->set('au.profilePicture', $qb->expr()->literal($parameter['params']['profilePicture']))
->set('au.userLang', $qb->expr()->literal($parameter['params']['userLang']))
->set('au.updatedAt', $qb->expr()->literal($updatedAt))
->set('au.updatedBy', $qb->expr()->literal($parameter['params']['artisanUserId']))
->set('a.artisanName',$qb->expr()->literal($parameter['params']['ArtisanName']))
->where('au.id = ?1')
->setParameter(1, $parameter['params']['artisanUserId'])
->getQuery();
$data = $query->execute();