在Doctrine Join条件类型中,WITH和ON有什么区别? [英] What is the difference between WITH and ON in Doctrine Join condition type?
问题描述
我正在寻找一种更好的解释,说明教义的伪装的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 $可以使用c $ c>。实际上,使用
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屋!