本文介绍了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:

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,数据库就是所有的字段和数据...

(屏幕:)
我真的无法想象是什么问题。

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.

您应该配置原则以使用小写表名。请参阅学说文档了解如何执行此操作。

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

08-20 13:59
查看更多