<tfoot id='eJ69A'></tfoot>

    <i id='eJ69A'><tr id='eJ69A'><dt id='eJ69A'><q id='eJ69A'><span id='eJ69A'><b id='eJ69A'><form id='eJ69A'><ins id='eJ69A'></ins><ul id='eJ69A'></ul><sub id='eJ69A'></sub></form><legend id='eJ69A'></legend><bdo id='eJ69A'><pre id='eJ69A'><center id='eJ69A'></center></pre></bdo></b><th id='eJ69A'></th></span></q></dt></tr></i><div id='eJ69A'><tfoot id='eJ69A'></tfoot><dl id='eJ69A'><fieldset id='eJ69A'></fieldset></dl></div>
      • <bdo id='eJ69A'></bdo><ul id='eJ69A'></ul>
      <legend id='eJ69A'><style id='eJ69A'><dir id='eJ69A'><q id='eJ69A'></q></dir></style></legend>

      <small id='eJ69A'></small><noframes id='eJ69A'>

    1. Doctrine Regular vs Fetch join

      Doctrine Regular vs Fetch join(Doctrine Regular vs Fetch join)
    2. <legend id='usskR'><style id='usskR'><dir id='usskR'><q id='usskR'></q></dir></style></legend>

        <small id='usskR'></small><noframes id='usskR'>

            • <bdo id='usskR'></bdo><ul id='usskR'></ul>

                  <tbody id='usskR'></tbody>
                <i id='usskR'><tr id='usskR'><dt id='usskR'><q id='usskR'><span id='usskR'><b id='usskR'><form id='usskR'><ins id='usskR'></ins><ul id='usskR'></ul><sub id='usskR'></sub></form><legend id='usskR'></legend><bdo id='usskR'><pre id='usskR'><center id='usskR'></center></pre></bdo></b><th id='usskR'></th></span></q></dt></tr></i><div id='usskR'><tfoot id='usskR'></tfoot><dl id='usskR'><fieldset id='usskR'></fieldset></dl></div>
                <tfoot id='usskR'></tfoot>
                本文介绍了Doctrine Regular vs Fetch join的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                在原则上,regular 和 fetch join 之间的区别是什么?我不只是通过阅读 文档.

                in doctrine, whats the diff between regular and fetch join? i dont get it just by reading the docs.

                // regular
                $query = $em->createQuery("SELECT u FROM User u JOIN u.address a WHERE a.city = 'Berlin'");
                $users = $query->getResult();
                
                // fetch
                $query = $em->createQuery("SELECT u, a FROM User u JOIN u.address a WHERE a.city = 'Berlin'");
                $users = $query->getResult();
                

                fetch join 的目的是什么?如果我 select u, a 为什么我只是得到 users ($users = $query->getResult();)?如果我使用常规连接,我可能可以使用 $user->getAddresses() 来访问相关对象?

                whats the purpose of fetch join? if i select u, a why am i just getting users ($users = $query->getResult();)? if i use a regular join, i can probably use $user->getAddresses() to access the related objects?

                推荐答案

                我认为文档描述得很好.如果您使用 fetch join,相关实体将包含在水合结果中.否则它们不会,如果您随后尝试访问它们,它将触发另一个查询以获取信息.

                I think the docs describe it pretty well. If you use a fetch join, the related entities will be included in the hydrated result. Otherwise they won't, and if you then try to access them it'll fire off another query to get the information.

                这只是是否应将其包含在结果中的问题.

                It's simply a matter of whether or not it should be included in the results.

                这篇关于Doctrine Regular vs Fetch join的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以
                PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的
                mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)
                Laravel Gmail Configuration Error(Laravel Gmail 配置错误)
                Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)
                Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)

                    <small id='8k79c'></small><noframes id='8k79c'>

                  1. <legend id='8k79c'><style id='8k79c'><dir id='8k79c'><q id='8k79c'></q></dir></style></legend>

                        <bdo id='8k79c'></bdo><ul id='8k79c'></ul>

                          <tbody id='8k79c'></tbody>
                        1. <i id='8k79c'><tr id='8k79c'><dt id='8k79c'><q id='8k79c'><span id='8k79c'><b id='8k79c'><form id='8k79c'><ins id='8k79c'></ins><ul id='8k79c'></ul><sub id='8k79c'></sub></form><legend id='8k79c'></legend><bdo id='8k79c'><pre id='8k79c'><center id='8k79c'></center></pre></bdo></b><th id='8k79c'></th></span></q></dt></tr></i><div id='8k79c'><tfoot id='8k79c'></tfoot><dl id='8k79c'><fieldset id='8k79c'></fieldset></dl></div>
                          <tfoot id='8k79c'></tfoot>