2010-04-11 87 views
0

是否可以覆蓋Symfony中的Doctrine模型?是否可以在Symfony中覆蓋Doctrine模型?

我想沒有任何變化 「NOTNULL」 屬性,但我可以得到它..

在 '插件/ sfDoctrineGuardPlugin /配置/教義/ schema.yml中':

sfGuardUser: 
    actAs: [Timestampable] 
    columns: 
    id: 
     type: integer(4) 
     primary: true 
     autoincrement: true 
    username: 
     type: string(128) 
     notnull: true  
     unique: true 
#... 

而且在 '配置/教義/ schema.yml中':

sfGuardUser: 
    columns: 
    username: 
     type: string(128) 
     notnull: false 
     unique: true 

然後 「集結所有重載」,但它不會改變..

任何想法?

哈維

+0

你是什麼版本?在1.4+中,您可以覆蓋架構。 – 2010-04-11 17:48:47

+0

sf 1.2。這就是原因..是否有任何方式操作模式覆蓋sf 1.2 o 1.3? – ziiweb 2010-04-11 20:13:40

回答

1

冠斑正如所說,你可以在Symfony的1.4覆蓋模式,你應該能夠做到這一點的Symfony的1.3也,如果你想不刪除升級項目已淘汰1.2的東西。

相關問題