I would like to make this with Doctrine 2 :
SELECT *,
(SELECT action FROM operations_history
WHERE timesheet.id = operations_history.timesheet_id
ORDER BY operations_history.created DESC
LIMIT 1) as status
FROM timesheet;
Any Help? I would like to do it with createQueryBuilder();
if possible. Thanks.