【发布时间】:2018-04-05 08:12:58
【问题描述】:
我想方设法取一个城市的最小 id 以避免我的一元论测试中的错误。尝试后,我有这个错误:
Doctrine\ORM\Query\QueryException: [语法错误] 第 0 行,第 62 列:
错误:预期 =、、>、>=、!=、得到 'AS'
public function testDB()
{
$id = $this->entityManager
->getRepository('AppBundle:City')
->createQueryBuilder('b')
->where("MIN(b.id) AS id")
->getQuery()
->getResult();
}
【问题讨论】:
标签: php symfony doctrine-orm doctrine dql