symfony doctrine:generate-module命令时出现sql语法错误

时间:2011-11-18 08:03:54

标签: php mysql symfony1 doctrine symfony-1.4

所以,我的问题是......

我正在尝试执行此命令:

  

php symfony doctrine:generate-module --env =“my_env”--non-verbose-templates backend city_theme CityTheme

暂停后,我收到此错误:

  

SQLSTATE [42000]:语法错误或访问冲突:1064 SQL语法中有错误;检查与MySQL服务器版本对应的手册,以便在第1行的“?LIMIT 1”附近使用正确的语法。查询失败:“ SELECT c.id AS c__id,c.city_theme_id AS c__city_theme_id,c.description AS c_ description,c.excursions AS c _excursions,c.image AS c_ image,c.keywords AS c _keywords,c.name AS c_ name,c .slug AS c _slug,c.title AS c__title FROM city_theme_data c WHERE(c.city_theme_id =?)LIMIT 1

此模型的schema.yml是:

CityTheme: 
  columns: 
    city_id: integer 
    lang: string(2) 
    guides: string 
  relations: 
    City: 
      class: City 
      local: city_id 
      foreign: id 
      foreignAlias: CityThemes 
      onDelete: CASCADE 

CityThemeData: 
  columns: 
    city_theme_id: integer 
    description: {type: string(255)} 
    excursions: string 
    image: {type: string(255)} 
    keywords: {type: string(255)} 
    name: {type: string(255)} 
    slug: {type: string(255)} 
    title: {type: string(255)} 
  relations: 
    CityTheme: 
      class: CityTheme 
      local: city_theme_id 
      foreign: id 
      foreignAlias: CityThemesData 
      onDelete: CASCADE 

有什么建议吗?

提前致谢。

0 个答案:

没有答案