开发者

Troubleshooting 'Unknown record property / related component "user" on "sfGuardUserProfile"' when loading fixture data

I am some trouble loading fixture data, that I have added manually in my admin backend and then simply exported the data using 'symfony doctrine:data-dump'

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

fixtures.yml (snippet) http://pastebin.com/CNWyhrgc

Now everything works fine when I run symfony doctrine:build --all, but when i tr开发者_Python百科y to load the data, I get:

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

This is really odd, as I have saved users and they've gone into both tables fine, just not when loading the fixtures that I exported fomr the database.

Does anyone have any ideas what the problem could be?

Thanks


Try this. create users.yml with

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'

and profile.yml with

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'

Maybe it help you.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜