<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to move a node while keeping primary child relationship? in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/how-to-move-a-node-while-keeping-primary-child-relationship/m-p/243868#M196998</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I transform original.txt into a PDF, and I want this PDF to be a primary child of original.txt, but stored in a different space.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;My Java code uses NodeService.createNode to create the PDF, and it works well, it is indeed a primary child.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now I wrote a FileFolderService.move code line to move the PDF to a different space, it works, but the PDF is not a primary child of original.txt anymore.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;How can I move the PDF to a different space while allowing it to keep being a primary child of original.txt ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you need it, here is the code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;ChildAssociationRef associationToPublished = nodeService.createNode(&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; original,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; QName.createQName("&lt;A href="http://www.my.co.jp/" rel="nofollow noopener noreferrer"&gt;http://www.my.co.jp/&lt;/A&gt;", "approvedVersion"),&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, "test"),&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; QName.createQName("&lt;A href="http://www.my.co.jp/" rel="nofollow noopener noreferrer"&gt;http://www.my.co.jp/&lt;/A&gt;", "approvedDocument"));&lt;BR /&gt;NodeRef published = associationToPublished.getChildRef();&lt;BR /&gt;fileFolderService.move(published, publicationSpace, "published.pdf");&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;EM&gt;Note: I need the primary relationship so that the publication is removed if the original is removed, without policies.&lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 16 Apr 2010 03:06:53 GMT</pubDate>
    <dc:creator>nicolasraoul</dc:creator>
    <dc:date>2010-04-16T03:06:53Z</dc:date>
    <item>
      <title>How to move a node while keeping primary child relationship?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-move-a-node-while-keeping-primary-child-relationship/m-p/243868#M196998</link>
      <description>Hello all,I transform original.txt into a PDF, and I want this PDF to be a primary child of original.txt, but stored in a different space.My Java code uses NodeService.createNode to create the PDF, and it works well, it is indeed a primary child.Now I wrote a FileFolderService.move code line to move</description>
      <pubDate>Fri, 16 Apr 2010 03:06:53 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-move-a-node-while-keeping-primary-child-relationship/m-p/243868#M196998</guid>
      <dc:creator>nicolasraoul</dc:creator>
      <dc:date>2010-04-16T03:06:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to move a node while keeping primary child relationship?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-move-a-node-while-keeping-primary-child-relationship/m-p/243869#M196999</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Does not seem possible.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I just ended up using a policy.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Apr 2010 03:13:45 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-move-a-node-while-keeping-primary-child-relationship/m-p/243869#M196999</guid>
      <dc:creator>nicolasraoul</dc:creator>
      <dc:date>2010-04-20T03:13:45Z</dc:date>
    </item>
  </channel>
</rss>

