我想将两个具有相同名称的文件上传到Alfreso存储库中(我可以将其上传到Documentum中,但是我遇到了异常有人可以告诉我如何实现它吗,因为这是我的业务用例,用户可以用它上传具有相同名称的文档。请注意,相同的文档可以在Documentum中正常工作。
[[2/12/20 16:43:03:554 IST] 00000040 SystemErr R org.apache.chemistry.opencmis.commons.exceptions.CmisContentAlreadyExistsException:具有该名称的对象已存在:01120277文件或文件夹Book_295_12.xlsx已经存在存在[2/12/20 16:43:03:555 IST] 00000040 SystemErr R,位于org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.convertStatusCode(AbstractAtomPubService.java:506)
为此,您应该覆盖contentModel.xml:
<type name="cm:folder">
<title>Folder</title>
<parent>cm:cmobject</parent>
<archive>true</archive>
<properties/>
<associations>
<child-association name="cm:contains">
<source>
<mandatory>false</mandatory>
<many>true</many>
</source>
<target>
<class>sys:base</class>
<mandatory enforced="false">false</mandatory>
<many>true</many>
</target>
<duplicate>false</duplicate>
<propagateTimestamps>true</propagateTimestamps>
</child-association>
</associations>
<overrides/>
<mandatory-aspects/>
</type>
您可以看到,子关联中有duplicate参数,其值为“ false”。您应该将其更改为“ true”