如何在Doctrine2中编写此(子查询选择)查询?

时间:2014-01-10 10:10:26

标签: symfony doctrine-orm

我需要知道如何在Doctrine 2中编写这个查询(我正在使用symfony2)

SELECT * FROM 
(
    SELECT m.id, m.reportName, m.createdAt, m.fileName, v.name 
    FROM Monitoring m 
    JOIN Venture v 
    ON m.venture_name = v.name 
    ORDER BY createdAt DESC
) AS r 
GROUP BY r.reportName, r.name
ORDER BY createdAt DESC

我的实体是:“Venture”,“Monitory”

0 个答案:

没有答案