使用sfDoctrineActAsTaggablePlugin在“...”上显示未知的记录属性/相关组件“...”

时间:2010-06-28 17:31:17

标签: php doctrine symfony-1.4 acts-as-taggable

我正在使用symfony插件sfDoctrineActAsTaggablePlugin将Taggable行为添加到我模型的某些对象中。

我按照here给出的指令,但是当我想在数据库中保存一个可标记元素时,我得到:

Unknown record property / related component "saved_tags" on "Mishidea"

Mishidea是我想要标记的类/表的名称。这是我的schema.yml文件的相关部分:

Mishidea:
  connection: doctrine
  actAs: {Timestampable: ~ , Taggable: ~ }      
  tableName: mishidea
  columns:
    idea_id:
      type: integer(4)
      primary: true
      autoincrement: true
    idea_title:
      type: string()
      notnull: true
      primary: false
    idea_summary:
      type: string()
      notnull: true
      primary: false
    idea_description:
      type: string()
      notnull: true
      primary: false
    idea_up:
      type: integer(8)
      notnull: true
      default: 0
      primary: false
    idea_down:
      type: integer(8)
      notnull: true
      default: 0
      primary: false
    idea_confirmation:
      type: boolean(1)
      default: false
      primary: false
    group_id:
      type: integer(4)
      notnull: false
      primary: false
  relations:
    Mishgroup:
      local: group_id
      foreign: group_id
      type: one
    Ideacomment:
      local: idea_id
      foreign: idea_id
      type: many
    Mishdocument:
      local: idea_id
      foreign: idea_id
      type: many
    RelIdeafollower:
      local: idea_id
      foreign: idea_id
      type: many

请注意,我也尝试过:

actAs:
    Timestampable: ~
    Taggable: ~

actAs:[Timestampable,Taggable]

而不是:

actAs: {Timestampable: ~ , Taggable: ~ }

但两种选择都会产生相同的结果。

似乎可以标记可标记元素和标记表之间的关系...

有关Taggable行为的特定问题,是否有人对“未知记录属性/相关组件”错误有任何了解?

非常感谢一些帮助。

如果这有助于我将Symfony 1.4与MySQL / InnoDB一起使用,并且也尝试使用PostgreSQL,结果相同。

由于

FuzzyTern

0 个答案:

没有答案