<?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 Re: Can you submit multiple calls to NodeService.getProperties at once? in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/can-you-submit-multiple-calls-to-nodeservice-getproperties-at/m-p/88427#M26561</link>
    <description>&lt;P&gt;Properties are associated with each node in alfresco repository and to get the properties associated with each node you have to make the nodeService.getProperties(nodeRef) call.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When you start with the parent node where you have created associations and want to get the list of associated nodes, you use nodeService.getChildAssocs(........) call, as you are doing. After getting the list of ChildAssocRef, to get the noderef of the child, you call childAssocNode.getChildRef() and using this nodeRef you get the properties pertaining to each child node.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The steps you are following seems correct, and to my knowledge there is no other way to get all child nodes and pass all nodeRefs at once and get the properties associated with each node. It has to be node by node call. There is no service/api which can provide this kind of results unless you want to get till the db level calls and do some customizations.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Maybe someone else will have a more precise answer and somewhere to look.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 04 Oct 2019 12:45:15 GMT</pubDate>
    <dc:creator>abhinavmishra14</dc:creator>
    <dc:date>2019-10-04T12:45:15Z</dc:date>
    <item>
      <title>Can you submit multiple calls to NodeService.getProperties at once?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/can-you-submit-multiple-calls-to-nodeservice-getproperties-at/m-p/88425#M26559</link>
      <description>TL&lt;IMG id="smileyvery-happy" class="emoticon emoticon-smileyvery-happy" src="https://migration33.stage.lithium.com/i/smilies/16x16_smiley-very-happy.png" alt="Smiley Very Happy" title="Smiley Very Happy" /&gt;R: I am using Alfresco 5.1 and I was wondering if there is a way to optimize queries to the nodeservice in case of a large query involving a bunch of nodes and properties.For example, say that I have this model:&amp;lt;model name="My model" xmlns="http://www.alfresco.org/model/dictionary/1.0"&amp;gt;&amp;nbsp;&amp;nbsp;</description>
      <pubDate>Mon, 06 May 2019 08:03:37 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/can-you-submit-multiple-calls-to-nodeservice-getproperties-at/m-p/88425#M26559</guid>
      <dc:creator>mnybon</dc:creator>
      <dc:date>2019-05-06T08:03:37Z</dc:date>
    </item>
    <item>
      <title>Re: Can you submit multiple calls to NodeService.getProperties at once?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/can-you-submit-multiple-calls-to-nodeservice-getproperties-at/m-p/88426#M26560</link>
      <description>&lt;P&gt;Hi mnybon,&lt;/P&gt;&lt;P&gt;im facing the same Problem right now, did you find a Solution to this ?&lt;/P&gt;</description>
      <pubDate>Wed, 02 Oct 2019 10:17:50 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/can-you-submit-multiple-calls-to-nodeservice-getproperties-at/m-p/88426#M26560</guid>
      <dc:creator>Renesto</dc:creator>
      <dc:date>2019-10-02T10:17:50Z</dc:date>
    </item>
    <item>
      <title>Re: Can you submit multiple calls to NodeService.getProperties at once?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/can-you-submit-multiple-calls-to-nodeservice-getproperties-at/m-p/88427#M26561</link>
      <description>&lt;P&gt;Properties are associated with each node in alfresco repository and to get the properties associated with each node you have to make the nodeService.getProperties(nodeRef) call.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When you start with the parent node where you have created associations and want to get the list of associated nodes, you use nodeService.getChildAssocs(........) call, as you are doing. After getting the list of ChildAssocRef, to get the noderef of the child, you call childAssocNode.getChildRef() and using this nodeRef you get the properties pertaining to each child node.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The steps you are following seems correct, and to my knowledge there is no other way to get all child nodes and pass all nodeRefs at once and get the properties associated with each node. It has to be node by node call. There is no service/api which can provide this kind of results unless you want to get till the db level calls and do some customizations.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Maybe someone else will have a more precise answer and somewhere to look.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Oct 2019 12:45:15 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/can-you-submit-multiple-calls-to-nodeservice-getproperties-at/m-p/88427#M26561</guid>
      <dc:creator>abhinavmishra14</dc:creator>
      <dc:date>2019-10-04T12:45:15Z</dc:date>
    </item>
    <item>
      <title>Re: Can you submit multiple calls to NodeService.getProperties at once?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/can-you-submit-multiple-calls-to-nodeservice-getproperties-at/m-p/88428#M26562</link>
      <description>&lt;P&gt;That is correct - there is no operation to get properties for multiple nodes in one call. And there is no need for such an operation, as that would not make sense - as you described, properties are always associated to specifically one node and that association is necessary for metadata to make sense. The only reason I can think of why you would want to perform the properties retrieval in one operation / call might be performance, e.g. the believe that by doing it in one operation, it may be more efficient. This is generally true - though the extent depends on the current state of Alfresco caches and what API you used to retrieve the list of nodes.&lt;/P&gt;
&lt;P&gt;E.g. if you retrieved nodes via a FTS search against SOLR, the properties for each node will already be pre-loaded into caches. So when you call getProperties on each result, Alfresco will actually not have to perform additional database calls to get the properties and the calls will be fast. The only performance overhead of doing multiple calls in this case may be permission checks, but these are perfectly valid / necessary, as each node can have different permissions applied to it.&lt;/P&gt;
&lt;P&gt;If you retrieve lists of (child) nodes via NodeService APIs, the properties may actually not be pre-cached (unless the same node was already accessed in previous transactions) and each call to getProperties may perform additional DB calls. The NodeService does not provide an API to remedy this, but the NodeBulkLoader API (an internal interface, not considered part of the Alfresco Public Java API) allows to pre-cache nodes in one bulk operation for improved performance, if really necessary.&lt;/P&gt;</description>
      <pubDate>Fri, 04 Oct 2019 13:08:15 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/can-you-submit-multiple-calls-to-nodeservice-getproperties-at/m-p/88428#M26562</guid>
      <dc:creator>afaust</dc:creator>
      <dc:date>2019-10-04T13:08:15Z</dc:date>
    </item>
  </channel>
</rss>

