I'm trying to run these following simple query (it works in postgresql)
update ja_clients set ref_inc_num = ref_inc_num + 1 where id = 43933 returning ref_inc_num;
into DQL
$query = $this->entityManager->createQuery();
$query->setDQL("UPDATE Geoop\Core\Entity\Account a SET a.jobReferenceNumber__ = a.jobReferenceNumber__ + 1 WHERE a.id = :accountId RETURNING a.jobReferenceNumber__");
$query->setParameter('accountId', $account->getId());
$total = $query->getSingleScalarResult();
but it doesn't work retuning this error:
#30 /var/www/geoop_api/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Parser.php (line 861): Doctrine\ORM\Query\Parser->syntaxError(end of string)
#31 /var/www/geoop_api/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Parser.php (line 448): Doctrine\ORM\Query\QueryException::dqlError(UPDATE Geoop\Core\Entity\Account a SET a.jobReferenceNumber__ = a.jobReferenceNumber__ + 1 WHERE a.id = :accountId RETURNING a.id as id)