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

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

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

    <tfoot id='gRhDX'></tfoot>

      使用学说 2 获取最后一个插入 ID?

      Get the last insert id with doctrine 2?(使用学说 2 获取最后一个插入 ID?)
          <tbody id='SFWkg'></tbody>
        • <legend id='SFWkg'><style id='SFWkg'><dir id='SFWkg'><q id='SFWkg'></q></dir></style></legend>

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

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

                本文介绍了使用学说 2 获取最后一个插入 ID?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我怎样才能得到带有 Dot 2 ORM 的最后一个插入 ID?我在教义的文档中没有找到这个,这甚至可能吗?

                How can I get the last insert id with doctrine 2 ORM? I didn't find this in the documentation of doctrine, is this even possible?

                推荐答案

                我不得不在刷新后使用它来获取最后一个插入 ID:

                I had to use this after the flush to get the last insert id:

                $em->persist($user);
                $em->flush();
                $user->getId();
                

                这篇关于使用学说 2 获取最后一个插入 ID?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                相关文档推荐

                Proxy Authentication Required with cURL(cURL 需要代理身份验证)
                How to use a SOCKS 5 proxy with cURL?(如何使用带有 cURL 的 SOCKS 5 代理?)
                How to use HTTP_X_FORWARDED_FOR properly?(如何正确使用 HTTP_X_FORWARDED_FOR?)
                file_get_contents behind a proxy?(代理后面的 file_get_contents ?)
                pecl install cassandra throws: quot;error: Unable to load libcassandraquot;(pecl install cassandra 抛出:“错误:无法加载 libcassandra)
                Installing php datastax driver on ubuntu(在 ubuntu 上安装 php datastax 驱动)

              1. <legend id='6oyD2'><style id='6oyD2'><dir id='6oyD2'><q id='6oyD2'></q></dir></style></legend>
                  <tbody id='6oyD2'></tbody>
                  <bdo id='6oyD2'></bdo><ul id='6oyD2'></ul>

                    • <tfoot id='6oyD2'></tfoot>

                          <small id='6oyD2'></small><noframes id='6oyD2'>

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