Symfony1 故障排除';未知记录属性/相关组件“;“用户”;关于;sfGuardUserProfile“';加载夹具数据时
我在加载夹具数据时遇到了一些问题,我已经在我的管理后端手动添加了这些数据,然后使用“symfony原则:数据转储”简单地导出了这些数据 schema.yml fixtures.yml(代码段) 现在,当我运行Symfony1 故障排除';未知记录属性/相关组件“;“用户”;关于;sfGuardUserProfile“';加载夹具数据时,symfony1,symfony-1.4,sfdoctrineguard,symfony-plugins,Symfony1,Symfony 1.4,Sfdoctrineguard,Symfony Plugins,我在加载夹具数据时遇到了一些问题,我已经在我的管理后端手动添加了这些数据,然后使用“symfony原则:数据转储”简单地导出了这些数据 schema.yml fixtures.yml(代码段) 现在,当我运行symfony原则:build--all时,一切正常,但当我尝试加载数据时,我得到: “sfGuardUserProfile”上的未知记录属性/相关组件“user” 这真的很奇怪,因为我保存了用户,并且他们很好地进入了这两个表,只是在加载我导出到数据库的fixture时没有 有人知道问题
symfony原则:build--all
时,一切正常,但当我尝试加载数据时,我得到:
“sfGuardUserProfile”上的未知记录属性/相关组件“user”
这真的很奇怪,因为我保存了用户,并且他们很好地进入了这两个表,只是在加载我导出到数据库的fixture时没有
有人知道问题出在哪里吗
谢谢,试试这个。使用创建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'
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'
和profile.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'
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'
也许对你有帮助。我也有同样的问题。似乎
用户
关系不起作用…我的示例是从原则:数据转储
生成的,奇怪的是,它不允许我重新加载数据..好吧,看来我有一个插件覆盖了我的config/doctor/schema.yml文件中的schema.yml。我删除了pluginschema.yml文件中的数据,重新构建了模型,现在一切正常!