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

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

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

      Symfony2:找不到基表或视图:1146

      Symfony2: Base table or view not found: 1146(Symfony2:找不到基表或视图:1146)

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

          <tbody id='mGbeA'></tbody>
        <tfoot id='mGbeA'></tfoot>

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

          <legend id='mGbeA'><style id='mGbeA'><dir id='mGbeA'><q id='mGbeA'></q></dir></style></legend>
            <bdo id='mGbeA'></bdo><ul id='mGbeA'></ul>
                本文介绍了Symfony2:找不到基表或视图:1146的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我正在和一个朋友一起做一个 Symfony2 项目.他在一台基于 Windows 的计算机上工作,而我在我的 Mac 上工作.我们设置了项目并在他的计算机上制作了数据库模型/实体(代码优先).现在我也想开始研究它,所以我们对我的本地主机做了一个 SQL 哑巴.我编辑了 parameters.yml 以匹配我的设置.该项目可以连接到服务器.但是,当我尝试打开使用数据库的页面时,出现此错误:

                Hi, I"m working with a friend on a Symfony2 project. He's working on a Windows based computer and I'm on my Mac. We setup the project and made the database model / entities (code first) on his computer. Now I wanted to start working on it as well so we did a SQL dumb to my localhost. I edited the parameters.yml to match my settings. The project can connect to the server. But when I try to open a page where the database is used i get this error:

                执行'SELECT t0.id AS id1, t0.name AS name2, t0.bigimage AS bigimage3, t0.smallimage AS smallimage4, t0.info AS info5, t0.city_id AS city_id6 FROM District t0'时发生异常:

                An exception occurred while executing 'SELECT t0.id AS id1, t0.name AS name2, t0.bigimage AS bigimage3, t0.smallimage AS smallimage4, t0.info AS info5, t0.city_id AS city_id6 FROM District t0':

                SQLSTATE[42S02]:未找到基表或视图:1146 表 'socialgeogroep6.District' 不存在500 内部服务器错误 - DBALException1 个链接异常:PDOException

                SQLSTATE[42S02]: Base table or view not found: 1146 Table 'socialgeogroep6.District' doesn't exist 500 Internal Server Error - DBALException 1 linked Exception: PDOException

                需要说明的是,页面在他的电脑上运行正常;他得到了应有的数据.


                Just to be clear, the page is running normal on his computer; he gets the data as it should be.


                可能是什么问题?我一遍又一遍地查看我的 PHPmyAdmin,数据库中包含所有字段和数据...
                (屏幕:http://gyazo.com/4a0e5f1ee6b1e29d2d277df5fc0d8aac)我真的无法想象这是什么问题.

                What can be the problem? I looked in my PHPmyAdmin over and over again and the database is there with all the fields and data...
                (screen: http://gyazo.com/4a0e5f1ee6b1e29d2d277df5fc0d8aac) I really can't imagine what the problem is.

                希望有人能帮助我们!

                推荐答案

                这可能是一个案例问题.您的数据库中有 district 表,但学说要求的是 District 表.

                It's likely a case issue. You have the district table on your database, but doctrine is asking for the District table.

                您应该配置学说以使用小写的表名.参考学说文档 http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/basic-mapping.html#persistent-classes 了解如何操作.

                You should configure doctrine to use lower case table name. Refer to the doctrine documentation http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/basic-mapping.html#persistent-classes to know how to do so.

                这篇关于Symfony2:找不到基表或视图:1146的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                相关文档推荐

                Is PHP or PHP based web framework stateful or stateless?(PHP 或基于 PHP 的 Web 框架是有状态的还是无状态的?)
                How to parse django style template tags(如何解析 django 样式模板标签)
                What is a good setup for editing PHP in Emacs?(在 Emacs 中编辑 PHP 的好设置是什么?)
                How to check whether specified PID is currently running without invoking ps from PHP?(如何在不从 PHP 调用 ps 的情况下检查指定的 PID 当前是否正在运行?)
                What#39;s the difference between escapeshellarg and escapeshellcmd?(escapeshellarg 和escapeshellcmd 有什么区别?)
                php in background exec() function(php 后台 exec() 函数)
              • <i id='nUWt6'><tr id='nUWt6'><dt id='nUWt6'><q id='nUWt6'><span id='nUWt6'><b id='nUWt6'><form id='nUWt6'><ins id='nUWt6'></ins><ul id='nUWt6'></ul><sub id='nUWt6'></sub></form><legend id='nUWt6'></legend><bdo id='nUWt6'><pre id='nUWt6'><center id='nUWt6'></center></pre></bdo></b><th id='nUWt6'></th></span></q></dt></tr></i><div id='nUWt6'><tfoot id='nUWt6'></tfoot><dl id='nUWt6'><fieldset id='nUWt6'></fieldset></dl></div>

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

                    • <tfoot id='nUWt6'></tfoot>

                        <tbody id='nUWt6'></tbody>
                      • <bdo id='nUWt6'></bdo><ul id='nUWt6'></ul>

                          <legend id='nUWt6'><style id='nUWt6'><dir id='nUWt6'><q id='nUWt6'></q></dir></style></legend>