0

我想我收到错误“[Syntax Error] line 0, col 194: Error: Expected =, <, <=, <>, >, >=, !=, got '.'”

因为我的 DQL 无效(第 3 行)?

SELECT COUNT(t.id) AS numTasks, COUNT(t.completedOn) AS numCompleted
FROM Application\Models\Todo t
WHERE t.todoList.project = :proj  
AND t.assigned = :user

如何深入了解相关元素?一个项目有 TodoLists,TodoLists 有 Todos。所以我试图获取待办事项来自指定项目的待办事项和已完成待办事项的总数

4

1 回答 1

0

Use an explicit LEFT JOIN or INNER JOIN. That would have been done under the hood anyways.

于 2011-01-21T12:00:53.260 回答