我对包含文档 ID 参考的 impex 有疑问。
来自文档:“特别是对于导入 partOf 项目值,有必要通过通常的唯一列技术以外的方式引用这些项目,因为 partOf 项目通常不提供唯一键,而仅将其封闭的父项作为外键。”
*items.xml 中的项目(仅最重要的部分)
<itemtype code="A" autocreate="true" generate="true" abstract="true"/>
<itemtype code="B" autocreate="true" generate="true" extends="A">
<deployment table="btable" typecode="20115" />
<attributes>
<attribute qualifier="code" type="java.lang.Integer" autocreate="true" generate="true">
<persistence type="property"/>
<modifiers optional="false"/>
</attribute>
</attributes>
</itemtype>
<itemtype code="C" autocreate="true" generate="true">
<deployment table="ctable" typecode="20117" />
<attributes>
<attribute qualifier="code" type="java.lang.String" autocreate="true" generate="true">
<persistence type="property"/>
<modifiers optional="false" unique="true"/>
</attribute>
<attribute qualifier="test" type="A" autocreate="true" generate="true">
<persistence type="property"/>
<modifiers optional="false" partof="true"/>
</attribute>
</attributes>
</itemtype>
英派克代码:
INSERT B;code;&docIdRef
;1;docId
INSERT_UPDATE C;code[unique=true];test(&docIdRef)
;uniqueCode;docId
错误信息:
cannot create C with values ItemAttributeMap[ registry: null, type: <null>, (...) due to [de.hybris.platform.servicelayer.interceptor.impl.MandatoryAttributesValidator@3b777877]:missing values for [test] in model C
当我从 'test' 属性(C 类)中删除 'partof' 修饰符时,一切正常。
我想知道如果我想保留“partof”修饰符,impex 应该是什么样子。