0

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

terrid25
  • 1,926
  • 8
  • 46
  • 87

1 Answers1

1

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.

denys281
  • 2,004
  • 2
  • 19
  • 38
  • I have the exact same problem. It seems like the `User` relation doesn't seemt o be working... – terrid25 Jun 09 '11 at 12:36
  • My example was generated form `doctrine:data-dump`, which is strange it wont let me load the data back in.. – terrid25 Jun 09 '11 at 14:27
  • Ok, so it seems I had some schema.yml from a plugin overriding my config/doctrine/schema.yml file. I removed the data in the plugin schema.yml file, re-built models and all is working now! – terrid25 Jun 10 '11 at 10:19