简体   繁体   English

Doctrine DQL 右连接?

[英]Doctrine DQL RIGHT JOIN?

是否可以在Doctrine 2 DQL 中进行 RIGHT OUTER JOIN ?

As far as I know, there is still no way to do that in DQL, and the reason might be that it does not make much sense from an ORM perspective, according to one of the lead developers.据一位主要开发人员称,据我所知,在 DQL 中仍然无法做到这一点,原因可能是从 ORM 的角度来看它没有多大意义

Nevertheless, the feature request, although very old, is still open;尽管如此,功能请求虽然很旧,但仍然开放; so it might be implemented in the future.所以它可能会在未来实施。

In MySQL 5.7: My desired result was returned when using either join , right join or right outer join .在 MySQL 5.7 中:使用joinright joinright outer join时返回了我想要的结果。

When I sought to translate this to Doctrine DQL, I returned the desired result using ->join(... .当我试图将其转换为 Doctrine DQL 时,我使用->join(...返回了所需的结果。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM