You are here

Adding an association

In this tutorial you add an association to your model. An association is a logical link between content types, it is a way of connecting related content.
Complete the previous tutorials in this series before attempting this one.
  1. In your IDE, open the file aio/aio-platform-jar/src/main/resources/alfresco/module/aio-platform-jar/model/content-model.xml and load it into the editor.
  2. Change the MyCompany generic document type to the following code:

        <!-- Enterprise-wide generic document type -->
        <type name="my:doc">
        	<title>MyCompany Generic Document</title>
        	<parent>cm:content</parent>
        	<associations>
        		<association name="my:relatedDocuments">
        			<title>Related Documents</title>
        			<source>
        				<mandatory>false</mandatory>
        				<many>true</many>
        			</source>
        			<target>
        				<class>my:doc</class>
        				<mandatory>false</mandatory>
        				<many>true</many>
        			</target>
        		</association>
        	</associations>
        </type>                    
                        
  3. You need to restart your SDK maven project using run.sh.
The association has been created and deployed.

Sending feedback to the Alfresco documentation team

You don't appear to have JavaScript enabled in your browser. With JavaScript enabled, you can provide feedback to us using our simple form. Here are some instructions on how to enable JavaScript in your web browser.