1

モデルの一部のオブジェクトにタグ付け可能な動作を追加するために、symfony プラグイン sfDoctrineActAsTaggablePlugin を使用しています。

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: ~ }

しかし、どちらの方法でも同じ結果が得られます。

タグ付け可能な要素とタグ付けテーブルの関係が確立されていないようです...

タグ付け可能な動作に関するこの特定の問題について、一般的に「不明なレコードプロパティ/関連コンポーネント」エラーについて何か知っている人はいますか?

いくつかの助けをいただければ幸いです。

それが役立つ場合、MySQL/InnoDBでSymfony 1.4を使用しており、PostgreSQLでも同じ結果を試しました。

ありがとう

ファジーターン

4

0 に答える 0