I think I am getting the error "[Syntax Error] line 0, col 194: Error: Expected =, <, <=, <>, >, >=, !=, got '.'"
Because my DQL is invalid (3rd line)?
SELECT COUNT(t.id) AS numTasks, COUN开发者_开发技巧T(t.completedOn) AS numCompleted
FROM Application\Models\Todo t
WHERE t.todoList.project = :proj
AND t.assigned = :user
How can I drill down into related elements? A Project have TodoLists, TodoLists have Todos. So I am trying to get the total number of todos & completed todos where the todo comes from the specified project
Use an explicit LEFT JOIN or INNER JOIN. That would have been done under the hood anyways.
精彩评论