如下图所示:
INSERT_UPDATE Product;code[unique=true];$supercategories;manufacturerName;manufacturerAID;unit(code);ean;variantType(code);$catalogVersion;$approved
;23191;1288, brand_5;Sony;ACC-CSPW;pieces;
默认情况下,ImpEx期望字段值为主键primary key. 下图这串长长的数字,代表 Hybris 单位 “pieces” 的主键。
Since primary keys are not usually known externally, ImpEx alternatively allows using attributes of the referenced item for lookup. They’re provided in brackets immediately after the column attribute name: ‘(’(’,’)* ‘)’.
因为主键一般来说对于外界消费者不可见,
所以使用文章开头的另一种语法:(引用条目名),下面的例子引用条目名为code,所以impEx里只需要出现单位的identifier code "pieces"即可,而不需要指定 unit 的主键。
要获取更多Jerry的原创文章,请关注公众号"汪子熙":