symfony2:尝试使用“doctrine:generate:entities”更新实体

时间:2012-03-08 12:53:55

标签: symfony doctrine-orm

我有这个文件:

#src/Jander/JanderBundle/resources/config/doctrine/metadata/orm/ 
Propuestas.orm.yml 
Propuestas: 
  type: entity 
  table: propuestas 
  fields: 
    id: 
      id: true 
      type: integer 
      unsigned: false 
      nullable: false 
      generator: 
        strategy: IDENTITY 
    contenido: 
      type: string 
      length: 230 
      fixed: false 
      nullable: false 
  lifecycleCallbacks: {  } 

我刚添加了一个像这样的新字段:

Propuestas: 
  type: entity 
  table: propuestas 
  fields: 
    id: 
      id: true 
      type: integer 
      unsigned: false 
      nullable: false 
      generator: 
        strategy: IDENTITY 
    contenido: 
      type: string 
      length: 230 
      fixed: false 
      nullable: false 
    contenido2: 
      type: string 
      length: 230 
      fixed: false 
      nullable: false 
  lifecycleCallbacks: {  } 

然后我正在尝试使用新字段和I生成实体 得到这个:

  

$ php app / console doctrine:generate:entities“JanderJanderBundle”

     
    

将Propuestas.php备份到Propuestas.php~     生成Volumus \ VolumusBundle \ Entity \ Propuestas

  

但是当我打开Propuestas.php时,没有任何参考 “contenido2”。

有什么想法吗?

1 个答案:

答案 0 :(得分:0)

清除缓存可以解决问题。这很奇怪,请确保您的缓存权限正常。

相关问题