Doctrine Query Builder语法错误

时间:2016-01-22 13:07:38

标签: php symfony doctrine-orm

我在一个存储库中有一个简单的查询,如:

    $qb = $this->createQueryBuilder('ci');
    $qb->select('ci.id');
    return $qb->getQuery()->getResult();

此查询返回错误:

"An exception occurred while executing 'SELECT m0_.id AS id_0 FROM match m0_':\n\nSQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'match m0_' at line 1"

我的问题是什么?

1 个答案:

答案 0 :(得分:0)

匹配是一个保留的关键字......以及我的表名!