• <small id='pTx8b'></small><noframes id='pTx8b'>

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

        无法找到与类“SomeBundleFolderSomeClass"的实体关联的对象管理器.

        Unable to find the object manager associated with an entity of class quot;SomeBundleFolderSomeClassquot;(无法找到与类“SomeBundleFolderSomeClass的实体关联的对象管理器.)
        <legend id='biLv1'><style id='biLv1'><dir id='biLv1'><q id='biLv1'></q></dir></style></legend>
            <tbody id='biLv1'></tbody>

          1. <small id='biLv1'></small><noframes id='biLv1'>

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

                  <bdo id='biLv1'></bdo><ul id='biLv1'></ul>

                  本文介绍了无法找到与类“SomeBundleFolderSomeClass"的实体关联的对象管理器.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  使用 Symfony 2.7,我正在尝试创建一个用户注册表单.我为此使用了 Symfony 自己的指南,并呈现了表单并且可填充.

                  Using Symfony 2.7, I am trying to create a user registration form. I've used Symfony's own guide for this, and the form is rendered and fillable.

                  当我填写表格并按注册"时,我收到以下错误.

                  When I fill in the form, and press "Register", I get the following error.

                  Unable to find the object manager associated with an entity of class "UserBundleModelsUser"
                  

                  这是在 vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntityValidator.php 第 75 行的以下条件下触发的

                  $em = $this->registry->getManagerForClass(get_class($entity));
                          if (!$em) {
                              throw new ConstraintDefinitionException(sprintf('Unable to find the object manager associated with an entity of class "%s".', get_class($entity)));
                          }
                  

                  在我的 UserController 的 createAction 中,实体管理器由 $em = $this->getDoctrine()->getManager(); 按照 Symfony Cookbook 中的说明获取.

                  In the createAction in my UserController, the Entity Manager is fetched by $em = $this->getDoctrine()->getManager(); as per the instructions in the Symfony Cookbook.

                  我不知道这里发生了什么.任何帮助表示赞赏!

                  I can't find out what's going here. Any help appreciated!

                  另外,如果缺少一些我应该提供的信息,请告诉我.

                  Also, please let me know if there is some information missing that I should have provided.

                  推荐答案

                  我认为除非您在配置中专门映射一个目录,否则学说将在 YourBundle/Entity 中查找 - 这是您的 User.php 示例与食谱食谱.

                  I think unless you specifically map a directory in your config, doctrine is going to look in YourBundle/Entity - this is where your User.php example diverges from the cookbook recipe.

                  如果你想改变它,你需要根据 文档

                  If you want to change this you'll need to specify it explicitly as per the documentation

                  或者只是将您的用户模型转移到 Entity 而不是 Models,我认为它会没问题.

                  Alternatively just shift your User model to Entity instead of Models and I think it'll be OK.

                  这篇关于无法找到与类“SomeBundleFolderSomeClass"的实体关联的对象管理器.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  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 的问题)
                  <i id='muBlr'><tr id='muBlr'><dt id='muBlr'><q id='muBlr'><span id='muBlr'><b id='muBlr'><form id='muBlr'><ins id='muBlr'></ins><ul id='muBlr'></ul><sub id='muBlr'></sub></form><legend id='muBlr'></legend><bdo id='muBlr'><pre id='muBlr'><center id='muBlr'></center></pre></bdo></b><th id='muBlr'></th></span></q></dt></tr></i><div id='muBlr'><tfoot id='muBlr'></tfoot><dl id='muBlr'><fieldset id='muBlr'></fieldset></dl></div>
                  • <tfoot id='muBlr'></tfoot>

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

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

                        <tbody id='muBlr'></tbody>

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