Search code examples
symfony1symfony-1.4sfdoctrineguardsymfony-plugins

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 try 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


Solution

  • Try this. create users.yml with

    sfGuardUser:
      sfGuardUser_1:
        email_address: [email protected]
        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: [email protected]
        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.