Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何将此查询转换为 DQL :
SELECT etat, count( * ) AS 'nombre' from commande GROUP BY etat;
请试试这个
select c,count(c.id) nombre from acmeBundle:commande c group by c.etat
不包括Where子句。你应该有命令实体。它将返回来自命令实体和计数的所有字段。您可以根据自己的需要进行纠正