[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

以上情况,各位朋友要留意一下。

 
  • 1. Cornelius
    2009-09-29 at 07:22

    Are you a professional journalist? You write very well.

  • 2. admin
    2009-09-30 at 08:29

    no, I am designer.

  • 3. Crasty
    2009-10-13 at 08:38

    I read a few topics. I respect your work and added blog to favorites.

  • 4. admin
    2009-10-13 at 10:29

    thank you.

  • 5. Brown
    2009-10-14 at 20:54

    I really like your blog and i respect your work. I’ll be a frequent visitor.

  • 6. Floost
    2009-10-17 at 09:29

    Valuable thoughts and advices. I read your topic with great interest.

  • 7. Frankie&hellip
    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….

  • 8. admin
    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 条留言 | 欢迎您也来跟两句

必填

必填(不对外显示)

:victory: :titter: :think: :surprise: :snooty: :smoke: :smile: :shout: :ruth: :question: :puzzle: :plutus: :noway: :laugh: :insidious: :ill: :hint: :hearten: :happy: :fury: :find: :faint: :embarrass: :congrats: :calculate: :bye: :avarice: :approve: :ablush:

可用的HTML标签如下:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

About
My sun

   人生路上,是非无常,祸福旦夕。放得开胸怀,才能收得下世界。--煮茶村长。

Calendar
09月 2010
« Jul    
 1234
567891011
12131415161718
19202122232425
2627282930