语法错误:应为Literal,得到'订单'



我在symfony 2.8:中得到了这个错误

3/3] Twig_Error_Runtime: An exception has been thrown during the rendering of a template ("[Syntax Error] line 0, col 128: Error: Expected Literal, got 'ORDER'").  -

第33行是

{% if admin.datagrid.results|length > 0 %}

QueryException ::dqlError ('SELECT o FROM WorkSeoControlBundleEntityDomain o LEFT JOIN o.strategy s_strategy LEFT JOIN o.renderer s_renderer WHERE ORDER BY o.id ASC')
in vendor/doctrine/orm/lib/Doctrine/ORM/Query/Parser.php at line 448

欢迎使用SO.

您的WHERE条件为空。移除或填充所需条件:(

SELECT o FROM WorkSeoControlBundleEntityDomain o LEFT JOIN o.strategy s_strategy LEFT JOIN o.renderer s_renderer ORDER BY o.id ASC

SELECT o FROM WorkSeoControlBundleEntityDomain o LEFT JOIN o.strategy s_strategy LEFT JOIN o.renderer s_renderer WHERE XXX=YYY ORDER BY o.id ASC

您只需要更改Repository类文件。删除where条件,因为它似乎是空的。

相关内容

  • 没有找到相关文章

最新更新