2

我有一个案例,我想检查数据库中是否已经存在客户。我为此创建了一个夹具文件:

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: example@example.com
      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 模型。以前有没有人成功导入客户设备?

4

1 回答 1

3
东:
    顾客:
        - entity_id:13
          entity_type_id: 1
          属性集ID:0
          网站编号:1
          电子邮件:example@example.com
          group_id:1
          store_id: 1
          is_active: 1
          名字:约翰
          姓氏:史密斯
于 2013-05-21T11:33:22.170 回答