What is the difference between WITH and ON in Doctrine Join condition type?

*爱你&永不变心* 提交于 2020-04-10 07:41:27

问题


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.

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.

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.

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.



来源:https://stackoverflow.com/questions/26101872/what-is-the-difference-between-with-and-on-in-doctrine-join-condition-type

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!