0

我在加载夹具数据时遇到了一些麻烦,我已经在我的管理后端手动添加了这些数据,然后使用“symfony 学说:数据转储”简单地导出了数据

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 回答