2012-03-16 67 views
1

生成模塊,當我嘗試使用命令php symfony doctrine:generate-module --with-show --non-verbose-templates backend comment TicketComments我得到這樣錯誤而symfony1.4

錯誤「TicketComments」模式有沒有「車票」的關係來創建一個模塊。

[?PHP use_stylesheets_for_form($形式)?]

[?PHP use_javascripts_for_form($形式)?]

這是我的schema.yml文件

ticket: 
    connection: doctrine 
    tableName: ticket 
    columns: 
    id: 
     type: integer(8) 
     fixed: false 
     unsigned: false 
     primary: true 
     autoincrement: true 
    client_id: 
     type: integer(8) 
     fixed: false 
     unsigned: false 
     primary: false 
     notnull: false 
     autoincrement: false 
    name: 
     type: string(200) 
     fixed: false 
     unsigned: false 
     primary: false 
     notnull: false 
     autoincrement: false 
    type: 
     type: string(20) 
     fixed: false 
     unsigned: false 
     primary: false 
     notnull: false 
     autoincrement: false 
    content: 
     type: string() 
     fixed: false 
     unsigned: false 
     primary: false 
     notnull: false 
     autoincrement: false 
    status: 
     type: string(10) 
     fixed: false 
     unsigned: false 
     primary: false 
     notnull: false 
     autoincrement: false 
    assigned_user_id: 
     type: integer(8) 
     fixed: false 
     unsigned: false 
     primary: false 
     notnull: false 
     autoincrement: false 
    estimated_time: 
     type: string(20) 
     fixed: false 
     unsigned: false 
     primary: false 
     notnull: false 
     autoincrement: false 
    working_status: 
     type: string(20) 
     fixed: false 
     unsigned: false 
     primary: false 
     notnull: false 
     autoincrement: false 
    working_status_comment: 
     type: string() 
     fixed: false 
     unsigned: false 
     primary: false 
     notnull: false 
     autoincrement: false 
    attachments: 
     type: string(50) 
     fixed: false 
     unsigned: false 
     primary: false 
     notnull: false 
     autoincrement: false 
    posttime: 
     type: string(150) 
     fixed: false 
     unsigned: false 
     primary: false 
     notnull: false 
     autoincrement: false 
TicketAttachments: 
    connection: doctrine 
    tableName: ticket_attachments 
    columns: 
    id: 
     type: integer(8) 
     fixed: false 
     unsigned: false 
     primary: true 
     autoincrement: true 
    ticket_id: 
     type: integer(8) 
     fixed: false 
     unsigned: false 
     primary: false 
     notnull: false 
     autoincrement: false 
    name: 
     type: string(200) 
     fixed: false 
     unsigned: false 
     primary: false 
     notnull: false 
     autoincrement: false 
    relations: 
    ticket: 
     local: ticket_id 
     foreign: id 
     type: one 
TicketComments: 
    connection: doctrine 
    tableName: ticket_comments 
    columns: 
    id: 
     type: integer(8) 
     fixed: false 
     unsigned: false 
     primary: true 
     autoincrement: true 
    ticket_id: 
     type: integer(8) 
     fixed: false 
     unsigned: false 
     primary: false 
     notnull: false 
     autoincrement: false 
    comment: 
     type: string() 
     fixed: false 
     unsigned: false 
     primary: false 
     notnull: false 
     autoincrement: false 
    file: 
     type: string(100) 
     fixed: false 
     unsigned: false 
     primary: false 
     notnull: false 
     autoincrement: false 
    post_date: 
     type: string(100) 
     fixed: false 
     unsigned: false 
     primary: false 
     notnull: false 
     autoincrement: false 
    relations: 
    ticket: 
     local: ticket_id 
     foreign: id 
     type: one 

任何人都請幫助我。謝謝你...

+0

其中的symfony /學說的版本?我試圖用一個新的項目與你的模式,每一件事情都很好。 – j0k 2012-03-19 13:33:52

+0

@ j0k我正在使用symfony 1.4和教條1.2。 – Juice 2012-03-20 03:40:08

回答

4

你有沒有試過重命名你的模式中的票證類? 目前它是「票」,小寫。嘗試用「門票」,然後使用重建類: symfony的原則:建立 - 全類

然後,它可以創建丟失的關係