开发者

Console dql join syntax?

I find it quite handy to write dql statements in console. For example,

./symfony doctrine:dql "from sfGuardUser where id = 8"

But, however I try I just can't seem to write a join query properly. I would love it to work this:

./symfony doctrine:dql "from sfGuardUser s left join s.Profile"

But it doesn't. What is t开发者_开发知识库he correct syntax?


I just tried it out, I could only get a normal join working (not a left join).

In this case a normal join is good enough. (One user has one profile)

./symfony doctrine:dql "from sfGuardUser s join s.Profile"
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜