Ошибка при создании модуля в symfony1.4 - PullRequest
1 голос
/ 16 марта 2012

, когда я пытаюсь создать модуль с помощью команды php symfony doctrine:generate-module --with-show --non-verbose-templates backend comment TicketComments Я получаю ошибку, подобную этой

Модель "TicketComments" не имеет отношения "ticket".

[? php use_stylesheets_for_form ($ form)?]

[? php use_javascripts_for_form ($ 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

любой, пожалуйста, помогите мне.спасибо ...

1 Ответ

4 голосов
/ 21 марта 2012

Вы пытались переименовать класс заявки в своей схеме? В настоящее время это «билет», строчные. Попробуйте с «Ticket», а затем перестроить ваши классы, используя: Учение Symfony: build --all-classes

Может создать недостающее отношение

...