<?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: CMIS Query to get documents with a specific aspect property value in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/cmis-query-to-get-documents-with-a-specific-aspect-property/m-p/68153#M22658</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is how you do a join so that you can query aspect-based properties while simultaneously restricted the results to those in a certain path:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;select D.cmis:name from cmis:document as D join sc:temp as T on D.cmis&lt;img id="smileysurprised" class="emoticon emoticon-smileysurprised" src="https://connect.hyland.com/i/smilies/16x16_smiley-surprised.png" alt="Smiley Surprised" title="Smiley Surprised" /&gt;bjectId = T.cmis&lt;img id="smileysurprised" class="emoticon emoticon-smileysurprised" src="https://connect.hyland.com/i/smilies/16x16_smiley-surprised.png" alt="Smiley Surprised" title="Smiley Surprised" /&gt;bjectId where T.sc&lt;img id="smileytongue" class="emoticon emoticon-smileytongue" src="https://connect.hyland.com/i/smilies/16x16_smiley-tongue.png" alt="Smiley Tongue" title="Smiley Tongue" /&gt;rop1 = 'value1' AND CONTAINS(D, 'PATH:\"/app:company_home/st:sites/cm:jtp-test-site-1/cm:documentLibrary//*\"')&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;The missing tidbit is that because you are doing a join, the selector ("D") has to be specified in the CONTAINS.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 29 Aug 2018 22:50:13 GMT</pubDate>
    <dc:creator>jpotts</dc:creator>
    <dc:date>2018-08-29T22:50:13Z</dc:date>
    <item>
      <title>CMIS Query to get documents with a specific aspect property value</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/cmis-query-to-get-documents-with-a-specific-aspect-property/m-p/68150#M22655</link>
      <description>I am trying to execute the following CMIS query that searches for all documents within a site that have the docStatus property set to 'Active' from defaultAspect type. The query errors out stating the below issue. Please can you let me know what is wrong with the query.Error Content:{"exception":"in</description>
      <pubDate>Wed, 29 Aug 2018 12:34:37 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/cmis-query-to-get-documents-with-a-specific-aspect-property/m-p/68150#M22655</guid>
      <dc:creator>kartech11</dc:creator>
      <dc:date>2018-08-29T12:34:37Z</dc:date>
    </item>
    <item>
      <title>Re: CMIS Query to get documents with a specific aspect property value</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/cmis-query-to-get-documents-with-a-specific-aspect-property/m-p/68151#M22656</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try the following sentence:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="line-numbers language-sql"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;SELECT&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;FROM&lt;/SPAN&gt; td:defaultAspect &lt;SPAN class="keyword token"&gt;WHERE&lt;/SPAN&gt; td:docStatus &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'Active'&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;and&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;CONTAINS&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;'PATH:\"&lt;SPAN class="operator token"&gt;/&lt;/SPAN&gt;app:company_home&lt;SPAN class="operator token"&gt;/&lt;/SPAN&gt;st:sites&lt;SPAN class="operator token"&gt;/&lt;/SPAN&gt;cm:testsite&lt;SPAN class="operator token"&gt;/&lt;/SPAN&gt;cm:documentLibrary&lt;SPAN class="comment token"&gt;//*\"')&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2018 16:20:07 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/cmis-query-to-get-documents-with-a-specific-aspect-property/m-p/68151#M22656</guid>
      <dc:creator>angelborroy</dc:creator>
      <dc:date>2018-08-29T16:20:07Z</dc:date>
    </item>
    <item>
      <title>Re: CMIS Query to get documents with a specific aspect property value</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/cmis-query-to-get-documents-with-a-specific-aspect-property/m-p/68152#M22657</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I believe you cannot select only on an aspect. You have to use a CMIS base type, even if that is just cmis:item, and then join with the aspect..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2018 19:30:10 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/cmis-query-to-get-documents-with-a-specific-aspect-property/m-p/68152#M22657</guid>
      <dc:creator>afaust</dc:creator>
      <dc:date>2018-08-29T19:30:10Z</dc:date>
    </item>
    <item>
      <title>Re: CMIS Query to get documents with a specific aspect property value</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/cmis-query-to-get-documents-with-a-specific-aspect-property/m-p/68153#M22658</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is how you do a join so that you can query aspect-based properties while simultaneously restricted the results to those in a certain path:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;select D.cmis:name from cmis:document as D join sc:temp as T on D.cmis&lt;img id="smileysurprised" class="emoticon emoticon-smileysurprised" src="https://connect.hyland.com/i/smilies/16x16_smiley-surprised.png" alt="Smiley Surprised" title="Smiley Surprised" /&gt;bjectId = T.cmis&lt;img id="smileysurprised" class="emoticon emoticon-smileysurprised" src="https://connect.hyland.com/i/smilies/16x16_smiley-surprised.png" alt="Smiley Surprised" title="Smiley Surprised" /&gt;bjectId where T.sc&lt;img id="smileytongue" class="emoticon emoticon-smileytongue" src="https://connect.hyland.com/i/smilies/16x16_smiley-tongue.png" alt="Smiley Tongue" title="Smiley Tongue" /&gt;rop1 = 'value1' AND CONTAINS(D, 'PATH:\"/app:company_home/st:sites/cm:jtp-test-site-1/cm:documentLibrary//*\"')&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;The missing tidbit is that because you are doing a join, the selector ("D") has to be specified in the CONTAINS.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2018 22:50:13 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/cmis-query-to-get-documents-with-a-specific-aspect-property/m-p/68153#M22658</guid>
      <dc:creator>jpotts</dc:creator>
      <dc:date>2018-08-29T22:50:13Z</dc:date>
    </item>
    <item>
      <title>Re: CMIS Query to get documents with a specific aspect property value</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/cmis-query-to-get-documents-with-a-specific-aspect-property/m-p/68154#M22659</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Axel, this query is working:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SELECT * FROM cm:titled&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've been writing queries by using only aspects many times. Am I wrong or I missed something?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Aug 2018 06:49:13 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/cmis-query-to-get-documents-with-a-specific-aspect-property/m-p/68154#M22659</guid>
      <dc:creator>angelborroy</dc:creator>
      <dc:date>2018-08-30T06:49:13Z</dc:date>
    </item>
    <item>
      <title>Re: CMIS Query to get documents with a specific aspect property value</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/cmis-query-to-get-documents-with-a-specific-aspect-property/m-p/68155#M22660</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As discussed in the IRC channel, the spec explicitlely states that only primary object types are supported in the FROM clause, but Alfresco has implemented it in a way that aspects / secondary object types can also be used. The reason for this is that the text of the spec was not fully consistent with the BNF of the query language, and Alfresco apparently followed the text more closely than the formal definition.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Aug 2018 09:07:45 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/cmis-query-to-get-documents-with-a-specific-aspect-property/m-p/68155#M22660</guid>
      <dc:creator>afaust</dc:creator>
      <dc:date>2018-08-30T09:07:45Z</dc:date>
    </item>
    <item>
      <title>Re: CMIS Query to get documents with a specific aspect property value</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/cmis-query-to-get-documents-with-a-specific-aspect-property/m-p/68156#M22661</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I believe you got ample answers.&amp;nbsp;I do like below, in case it helps in any way&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT doc.*, slo.* FROM cmis:document AS doc JOIN slo:documentProperties AS slo ON doc.cmis&lt;img id="smileysurprised" class="emoticon emoticon-smileysurprised" src="https://connect.hyland.com/i/smilies/16x16_smiley-surprised.png" alt="Smiley Surprised" title="Smiley Surprised" /&gt;bjectId = slo.cmis&lt;img id="smileysurprised" class="emoticon emoticon-smileysurprised" src="https://connect.hyland.com/i/smilies/16x16_smiley-surprised.png" alt="Smiley Surprised" title="Smiley Surprised" /&gt;bjectId&amp;nbsp; WHERE&amp;nbsp; IN_FOLDER(doc, 'workspace://SpacesStore/3105f215-228e-4087-aef8-4a9399eb0b60') AND (slo.slo:m_link = 128) AND (slo.slo:m_category = 'Person')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;m_link&lt;/STRONG&gt; and &lt;STRONG&gt;m_category&lt;/STRONG&gt; are the aspect properties&lt;/P&gt;&lt;P&gt;I have an aspect defined this way in our own custom model. Here is an extract of our custom model.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;types&amp;gt;&lt;BR /&gt; &amp;lt;!-- custom document type --&amp;gt;&lt;BR /&gt; &amp;lt;type name="&lt;STRONG&gt;slo:mdocument&lt;/STRONG&gt;"&amp;gt;&lt;BR /&gt; &amp;lt;title&amp;gt;SLO Document type&amp;lt;/title&amp;gt;&lt;BR /&gt; &amp;lt;parent&amp;gt;cm:content&amp;lt;/parent&amp;gt;&lt;BR /&gt; &lt;BR /&gt; &amp;lt;!-- associations section - no associations as of now --&amp;gt;&lt;BR /&gt; &amp;lt;!-- aspect is defined to hold all the properties --&amp;gt;&lt;BR /&gt; &amp;lt;mandatory-aspects&amp;gt;&lt;BR /&gt; &lt;STRONG&gt;&amp;lt;aspect&amp;gt;slo:documentProperties&amp;lt;/aspect&amp;gt;&lt;/STRONG&gt;&lt;BR /&gt; &amp;lt;/mandatory-aspects&amp;gt;&lt;BR /&gt; &amp;lt;/type&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;/types&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;aspects&amp;gt;&lt;BR /&gt; &amp;lt;!-- There is one aspect with all the custom properties defined --&amp;gt;&lt;BR /&gt; &lt;STRONG&gt;&amp;lt;aspect name="slo:documentProperties"&amp;gt;&lt;/STRONG&gt;&lt;BR /&gt; &amp;lt;title&amp;gt;m document properties&amp;lt;/title&amp;gt;&lt;BR /&gt; &amp;lt;properties&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;property name="slo:&lt;STRONG&gt;m_category&lt;/STRONG&gt;"&amp;gt;&lt;BR /&gt; &amp;lt;title&amp;gt;Category&amp;lt;/title&amp;gt;&lt;BR /&gt; &amp;lt;type&amp;gt;d:text&amp;lt;/type&amp;gt;&lt;BR /&gt;&lt;BR /&gt; &amp;lt;/property&amp;gt;&lt;BR /&gt; &amp;lt;property name="slo:&lt;STRONG&gt;m_link&lt;/STRONG&gt;"&amp;gt;&lt;BR /&gt; &amp;lt;title&amp;gt;Link ID&amp;lt;/title&amp;gt;&lt;BR /&gt; &amp;lt;type&amp;gt;d:int&amp;lt;/type&amp;gt;&lt;BR /&gt; &amp;lt;/property&amp;gt;&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Aug 2018 15:36:10 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/cmis-query-to-get-documents-with-a-specific-aspect-property/m-p/68156#M22661</guid>
      <dc:creator>sepgs2004</dc:creator>
      <dc:date>2018-08-30T15:36:10Z</dc:date>
    </item>
  </channel>
</rss>

