2013-04-09 22 views
2

我有一个情况,我想检查客户是否已经存在于数据库中。我创建了一个固定的文件为这样:Magento EcomDev PHPUnit客户装置未加载

scope: 
    website: 
    - website_id: 1 
     code: main 
     name: Main Website 
     default_group_id: 1 
    group: 
    - group_id: 1 
     website_id: 1 
     name: Main Website Store 
     root_category_id: 8 
     default_store_id: 1 
    store: 
    - store_id: 1 
     code: default 
     website_id: 1 
     group_id: 1 
     name: Default Store View 
     is_active: 1 
eav: 
    customer: 
    - entity_id: 13 
     entity_type_id: 1 
     website_id: 1 
     email: [email protected] 
     group_id: 1 
     store_id: 1 
     is_active: 1 
     firstname: john 
     lastname: smith 

当我运行测试,我得到的错误:

Zend_Db_Statement_Exception: SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'sort_order' in order clause is ambiguous 

此错误只发生在我加载夹具,所以我觉得它有什么与Model_Fixture_Eav类相关。我不确定我应该采用哪种方法为客户创建EAV模型。有没有人成功导入过客户装置?

回答

3
 
eav: 
    customer: 
     - entity_id: 13 
      entity_type_id: 1 
      attribute_set_id: 0 
      website_id: 1 
      email: [email protected] 
      group_id: 1 
      store_id: 1 
      is_active: 1 
      firstname: john 
      lastname: smith 
+5

欢迎来到Stack Overflow!你会考虑增加一些叙述来解释为什么这段代码有效吗?是什么使它成为这个问题的答案?这对询问问题的人以及任何其他人来说非常有帮助。 – 2013-05-21 18:58:43