如何使用symfony和doctrine queryBuilder执行嵌套查询? 例如:
select data.name from
(
select case when name = 'Alfred' then 'Thomas' else name end as name
from employee
) as data;
谢谢
答案 0 :(得分:0)
我使用本地sql解析:
$stmt = $this->doctrine->getConnection()->prepare('your_query');
$stmt->execute();
$res = $stmt->fetchAll();