加载架构问题

时间:2011-03-13 11:39:06

标签: symfony1 doctrine

我有以下schema.yml:

Category:
  connection: doctrine
  tableName: category
  columns:
    id:
      type: integer(8)
      fixed: false
      unsigned: false
      primary: true
      autoincrement: true
    name:
      type: string(255)
      fixed: false
      unsigned: false
      primary: false
      notnull: true
      autoincrement: false
    url_name:
      type: string(255)
      fixed: false
      unsigned: false
      primary: false
      notnull: true
      autoincrement: false
  relations:
    SCategory:
      local: id
      foreign: category_id
      type: many
SCategory:
  connection: doctrine
  tableName: s_category
  columns:
    id:
      type: integer(8)
      fixed: false
      unsigned: false
      primary: true
      autoincrement: true
    category_id:
      type: integer(8)
      fixed: false
      unsigned: false
      primary: false
      notnull: true
      autoincrement: false
    name:
      type: string(255)
      fixed: false
      unsigned: false
      primary: false
      notnull: true
      autoincrement: false
    url_name:
      type: string(255)
      fixed: false
      unsigned: false
      primary: false
      notnull: true
      autoincrement: false
  relations:
    Category:
      local: category_id
      foreign: id
      type: one
    SsCategory:
      local: id
      foreign: s_category_id
      type: many
SsCategory:
  connection: doctrine
  tableName: ss_category
  columns:
    id:
      type: integer(8)
      fixed: false
      unsigned: false
      primary: true
      autoincrement: true
    s_category_id:
      type: integer(8)
      fixed: false
      unsigned: false
      primary: false
      notnull: true
      autoincrement: false
    name:
      type: string(255)
      fixed: false
      unsigned: false
      primary: false
      notnull: true
      autoincrement: false
    url_name:
      type: string(255)
      fixed: false
      unsigned: false
      primary: false
      notnull: true
      autoincrement: false
  relations:
    SCategory:
      local: s_category_id
      foreign: id
      type: one

当我尝试加载以下数据时:

Category:
   TV_HiFi_video:
      name:TV, HiFi & vidéo
SCategory:
   Elements_separes_Hi_Fi:
       name:Eléments séparés Hi Fi
       category_id:TV_HiFi_video
SsCategory:
   Amplificateur:
       name:Amplificateur
       s_category_id:Elements_separes_Hi_Fi

它表示“数据已成功加载”,但数据库中未添加任何数据。 欢呼声

0 个答案:

没有答案