Alfresco:发现1个完整性违规:关联源类型不正确

时间:2018-07-04 15:03:47

标签: alfresco alfresco-share

我想创建vncr:sender节点作为nvcr:senders节点(自定义类型)的子节点。

vncr:senders模型:

    <type name="vncr:senders">
        <title>Courrier senders</title>
        <parent>cm:content</parent>
        <associations>
            <child-association name="vncr:contains_sender">
                <source>
                    <mandatory>false</mandatory>
                    <many>false</many>
                </source>
                <target>
                    <class>vncr:sender</class>
                    <mandatory>false</mandatory>
                    <many>true</many>
                </target>
                <duplicate>false</duplicate>
            </child-association>
        </associations>
    </type>

vncr:发送方模型

    <type name="vncr:sender">
        <title>Courrier sender</title>
        <parent>cm:content</parent>
        <properties>
            <property name="vncr:name_sender">
                <type>d:text</type>
                <mandatory>true</mandatory>
                <multiple>false</multiple>
            </property>
            <property name="vncr:email_sender">
                <type>d:text</type>
                <mandatory>true</mandatory>
            </property>
        </properties>
    </type>

模板实例组件

    <component>
        <region-id>sender</region-id>
        <url>/components/form?mimeType={mimeType}</url>
        <properties>
            <itemKind>type</itemKind>
            <itemId>vncr:sender</itemId>
            <destination>{destination}</destination>
            <mode>create</mode>
            <submitType>json</submitType>
            <showCaption>true</showCaption>
            <showCancelButton>true</showCancelButton>
            <htmlid>{htmlid}</htmlid>
        </properties>
    </component>

提交表格时,我将收到以下回复

  

“消息”:“ 06040016发现1完整性违规:\ n关联   源类型不正确:\ n源节点:   工作区:// SpacesStore / c7ccd6bc-4e0c-4662-8660-58d263a81e4d \ n
  协会:协会[   class = ClassDef [name = {http://www.alfresco.org/model/content/1.0}文件夹],   名称= {http://www.alfresco.org/model/content/1.0}包含目标   class = {http://www.alfresco.org/model/system/1.0}基础,源   role = null,目标role = null] \ n必需的源类型:   {http://www.alfresco.org/model/content/1.0}文件夹\ n实际   来源类型:{http://www.vneuron.com/model/courrier/1.0}发件人”,

     

“例外”:“ org.alfresco.repo.node.integrity.IntegrityException-   06040016发现1完整性违规:\ n关联源类型为   错误:\ n源节点:   工作区:// SpacesStore / c7ccd6bc-4e0c-4662-8660-58d263a81e4d \ n
  协会:协会[   class = ClassDef [name = {http://www.alfresco.org/model/content/1.0}文件夹],   名称= {http://www.alfresco.org/model/content/1.0}包含目标   class = {http://www.alfresco.org/model/system/1.0}基础,源   role = null,目标role = null] \ n必需的源类型:   {http://www.alfresco.org/model/content/1.0}文件夹\ n实际   来源类型:{http://www.vneuron.com/model/courrier/1.0}发件人”,

1 个答案:

答案 0 :(得分:1)

您正在尝试在"cm:content"下创建一个"cm:content",我认为这是不可能的。错误消息也试图通过表示期望"cm:folder"来传达这一点。

请注意,您可以将两个cm:content节点关联,而不能与父/子关联关联。

相关问题