对“未知记录属性/相关组件“用户”进行故障排除在“sfGuardUserProfile”上加载夹具数据时

发布于 2024-11-15 04:14:39 字数 531 浏览 5 评论 0原文

我在加载固定装置数据时遇到一些麻烦,我已在管理后端手动添加了这些数据,然后只需使用“symfonydoctrine:data-dump”

schema.yml 导出数据 http://pastebin.com/5LTzNtU1

Fixtures.yml(片段) http://pastebin.com/CNWyhrgc

现在,当我运行 symfonydoctrine:build 时,一切正常全部,但是当我尝试加载数据时,我得到:

“sfGuardUserProfile”上的未知记录属性/相关组件“user”

这真的很奇怪,因为我已经保存了用户并且他们已经进入两个表都很好,只是在加载我从数据库导出的灯具时没有。

有谁知道问题可能是什么?

谢谢

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

流绪微梦 2024-11-22 04:14:39

试试这个。创建 users.yml

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'

和 profile.yml

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'

也许它可以帮助你。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文