【问题标题】:Invalid schema element named "JobeetCategories" at path "JobeetAffiliate"路径“JobeetAffiliate”中名为“JobeetCategories”的无效架构元素
【发布时间】:2011-08-22 10:03:59
【问题描述】:

我已经按照这个教程Joobeet 1.4 Day 3

<code> JobeetCategory:
  actAs: { Timestampable: ~ }
  columns:
    name: { type: string(255), notnull: true, unique: true }

JobeetJob:
  actAs: { Timestampable: ~ }
  columns:
    category_id:  { type: integer, notnull: true }
    type:         { type: string(255) }
    company:      { type: string(255), notnull: true }
    logo:         { type: string(255) }
    url:          { type: string(255) }
    position:     { type: string(255), notnull: true }
    location:     { type: string(255), notnull: true }
    description:  { type: string(4000), notnull: true }
    how_to_apply: { type: string(4000), notnull: true }
    token:        { type: string(255), notnull: true, unique: true }
    is_public:    { type: boolean, notnull: true, default: 1 }
    is_activated: { type: boolean, notnull: true, default: 0 }
    email:        { type: string(255), notnull: true }
    expires_at:   { type: timestamp, notnull: true }
  relations:
    JobeetCategory: { onDelete: CASCADE, local: category_id, foreign: id, foreignAlias: JobeetJobs }

JobeetAffiliate:
  actAs: { Timestampable: ~ }
  columns:
    url:       { type: string(255), notnull: true }
    email:     { type: string(255), notnull: true, unique: true }
    token:     { type: string(255), notnull: true }
    is_active: { type: boolean, notnull: true, default: 0 }
  relations:
    JobeetCategories:
      class: JobeetCategory
      refClass: JobeetCategoryAffiliate
      local: affiliate_id
      foreign: category_id
      foreignAlias: JobeetAffiliates

JobeetCategoryAffiliate:
  columns:
    category_id:  { type: integer, primary: true }
    affiliate_id: { type: integer, primary: true }
  relations:
    JobeetCategory:  { onDelete: CASCADE, local: category_id, foreign: id }
    JobeetAffiliate: { onDelete: CASCADE, local: affiliate_id, foreign: id } </code>

【问题讨论】:

    标签: symfony-1.4 jobeet


    【解决方案1】:

    你的代码在我身上运行。 1. 检查 schema.yml 是否有语法错误。 2. 2.1 备份您的项目。 2.2(我认为这对你有帮助)。转到 lib/model/doctrine/base - 并删除所有文件。 制作:

    $ php symfony doctrine:build --all --and-load --no-confirmation
    

    UPD : 删除以下所有文件:lib/form/doctrine/baselib/filter/doctrine/base

    【讨论】:

      猜你喜欢
      • 2011-10-20
      • 1970-01-01
      • 2015-08-31
      • 1970-01-01
      • 2022-11-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多