0

管理者バックエンドに手動で追加し、「symfony doctrine:data-dump」を使用してデータをエクスポートしただけのフィクスチャ データの読み込みに問題があります。

schema.yml http://pastebin.com/5LTzNtU1

Fixtures.yml (スニペット) http://pastebin.com/CNWyhrgc

を実行するとすべて正常に動作symfony doctrine:build --allしますが、データをロードしようとすると、次のようになります。

Unknown record property / related component "user" on "sfGuardUserProfile"

データベースからエクスポートしたフィクスチャをロードするときではなく、ユーザーを保存し、両方のテーブルに問題なく移動したため、これは本当に奇妙です。

誰が問題が何であるか考えていますか?

ありがとう

4

1 に答える 1

1

これを試して。users.yml を作成します

sfGuardUser:
  sfGuardUser_1:
    email_address: test@example.com
    username: test_user
    algorithm: sha1
    salt: 6fdcd99a2c73d6270f1ed8dbbf7ccd3e
    password: fed98ad16c318197d16a2d7375f81e1afbce0792
    is_active: true
    is_super_admin: true
    last_login: '2011-05-03 09:37:08'
    first_name: ''
    last_name: ''
    created_at: '2011-04-11 11:29:02'
    updated_at: '2011-05-03 09:37:08'

と profile.yml で

sfGuardUserProfile:
  sfGuardUserProfile_1:
    User: sfGuardUser_1
    email_new: test@example.com
    firstname: Test
    lastname: User
    validate_at: null
    validate: null
    created_at: '2011-04-19 15:46:16'
    updated_at: '2011-04-19 15:49:14'

多分それはあなたを助けます。

于 2011-06-09T12:07:24.510 に答える