What is the difference between WITH and ON in Doctrine Join condition type?(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 有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Doctrine Join 条件类型中的 WITH 和 ON 有什么区别?
基础教程推荐
- 如何替换eregi() 2022-01-01
- 有什么方法可以用编码 UTF-8 而不是 Unicode 返回 PHP`json_encode`? 2021-01-01
- 如何在 Laravel 5.3 注册中添加动态下拉列表列? 2021-01-01
- YouTube API v3 点赞视频,但计数器不增加 2022-01-01
- 学说 dbal querybuilder 作为准备好的语句 2022-01-01
- Cron Jobs 调用带有变量的 PHP 脚本 2022-01-01
- 如何在 Laravel 中使用 React Router? 2022-01-01
- PHP PDO MySQL 查询 LIKE ->多个关键词 2021-01-01
- 在PHP中根据W3C规范Unicode 2022-01-01
- PHP 类:全局变量作为类中的属性 2021-01-01
