Symfony2:找不到底座或视图:1146 [英] Symfony2: Base table or view not found: 1146

查看:138
本文介绍了Symfony2:找不到底座或视图:1146的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我和Symfony2项目的朋友一起工作,他正在一台基于Windows的计算机上工作,我在Mac上。
我们在他的计算机上设置了这个项目并创建了数据库模型/实体(代码第一),现在我想开始工作,所以我们对我的localhost做了一个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内部服务器错误 - DBALException
1链接异常: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 »

只是为了cl耳朵,网页在他的电脑上正常运行;他应该得到数据。





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.

我希望有人可以帮助我们!

I hope someone can help us!

推荐答案

这可能是一个案例问题。您的数据库中有区域表,但教义是要求区域表。

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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆