[Symfony] 2009-09-02 11:30 |
我来说两句
|
Doctrine:build-model有一个奇怪的问题
问题的开端是在,我使用Symfony Doctrine:build-model 之间,在调试程序时,发现Doctrine类找不到MySQL所对应的表,后来检查了一下,发现Doctrine自动生成的表名,竟然自动加了一个下横线”_“,晕。
摸索了一下,发现了以下规则,
如果是在schema中,表名是全名小写的,则Doctrine中也是全部小写,没有问题。
例:
schema中为 prjmaster,
则Doctrine中也是为prjmaster。
如果是在schema中,表名是大小写混合的,则Doctrine中会全部小写,而且还会在大写字母前面加下横线”_”,这时候就出问题(导致在MySQL中找不到该表)。
例:
schema中为 prjMaster,
则Doctrine中是为prj_master。
以上情况,各位朋友要留意一下。

2009-09-29 at 07:22
Are you a professional journalist? You write very well.
2009-09-30 at 08:29
no, I am designer.
2009-10-13 at 08:38
I read a few topics. I respect your work and added blog to favorites.
2009-10-13 at 10:29
thank you.
2009-10-14 at 20:54
I really like your blog and i respect your work. I’ll be a frequent visitor.
2009-10-17 at 09:29
Valuable thoughts and advices. I read your topic with great interest.
2010-06-12 at 13:01
How are you?! Please e-mail me your contacts. I have a question james@infansport.ru” rel=”nofollow”>……
Best regards….
2010-06-14 at 09:13
Dear Frankie:
In my blog(http://blog.e-midas.cn) you mentioned a problem to find me, what happened?
aleyn.wu / 2010-06-14
8 条留言 | 欢迎您也来跟两句
可用的HTML标签如下:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>