Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我发现在控制台中编写 dql 语句非常方便。例如,
./symfony doctrine:dql "from sfGuardUser where id = 8"
但是,无论我如何尝试,我似乎都无法正确编写连接查询。我很乐意这样做:
./symfony doctrine:dql "from sfGuardUser s left join s.Profile"
但事实并非如此。什么是正确的语法?
我刚试了一下,我只能得到一个正常的连接工作(不是左连接)。
在这种情况下,普通连接就足够了。(一个用户有一个配置文件)
./symfony doctrine:dql "from sfGuardUser s join s.Profile"