Doctrine Join 条件类型中的 WITH 和 ON 有什么区别? [英] What is the difference between WITH and ON in Doctrine Join condition type?

查看:17
本文介绍了Doctrine Join 条件类型中的 WITH 和 ON 有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找关于教义条款的 WITH 和 ON 条件类型之间区别的更好解释.

I'm searching for a better explanation about the difference between WITH and ON condition type for the doctrine clausure.

我正在寻找关于这个非常糟糕的文档,但我仍然有疑问.

I'm finding the documentation about this very poor and I'm still in doubt.

推荐答案

在我看来,这有点像是原则 1 的遗留问题.

In my opinion it's kind of a left over from doctrine 1.

当时ON用于重新定义关系的连接条件,而WITH用于在默认连接条件的基础上增加更多的连接条件.

Back then ON was used to redefine the join conditions of relations, whereas WITH was used to add more join conditions to the default one.

现在在学说 2 中,我从未见过可以使用 ON 的情况.事实上,使用 ON 总是会出现异常,提示您应该使用 WITH.

Now in doctrine 2 I have never seen a situation where ON can be used. In fact using ON always ends up in an exception saying you should use WITH.

现在 WITH 可用于将连接条件添加到关系中定义的默认条件,或者,如果两个实体之间不存在关系,则定义连接条件.

Right now WITH can be used to add join conditions to the default one defined in a relation or, if no relation exists between two entities, define the join condition.

这篇关于Doctrine Join 条件类型中的 WITH 和 ON 有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆