Symfony1 是否可能覆盖Symfony中的条令模型?

Symfony1 是否可能覆盖Symfony中的条令模型?,symfony1,doctrine,Symfony1,Doctrine,是否可能覆盖Symfony中的条令模型 我正在尝试不更改“notnull”属性,但我可以得到它 在“plugins/sfDoctrineGuardPlugin/config/doctor/schema.yml”中: sfGuardUser: actAs: [Timestampable] columns: id: type: integer(4) primary: true autoincrement: true usern

是否可能覆盖Symfony中的条令模型

我正在尝试不更改“notnull”属性,但我可以得到它

在“plugins/sfDoctrineGuardPlugin/config/doctor/schema.yml”中:

sfGuardUser:
   actAs: [Timestampable]
   columns:
     id:
       type: integer(4)
       primary: true
       autoincrement: true
     username:
       type: string(128)
       notnull: true    
       unique: true
#...
sfGuardUser:
   columns:
     username:
       type: string(128)
       notnull: false
       unique: true
在'config/doctrine/schema.yml'中:

sfGuardUser:
   actAs: [Timestampable]
   columns:
     id:
       type: integer(4)
       primary: true
       autoincrement: true
     username:
       type: string(128)
       notnull: true    
       unique: true
#...
sfGuardUser:
   columns:
     username:
       type: string(128)
       notnull: false
       unique: true
然后“构建所有重新加载”,但不会更改

有什么想法吗


Javi

正如coronatus所说,您可以在Symfony 1.4中覆盖模式,如果您希望升级项目而不删除所有不推荐的1.2内容,您也可以在Symfony 1.3中覆盖模式。

您使用的是什么版本?在1.4+中,您可以覆盖schemas.sf 1.2。这就是原因。有没有办法在sf 1.2到1.3中操作模式覆盖?