AnsweredAssumed Answered

Querying Custom MetaData

Question asked by dallinns on Mar 14, 2011
Latest reply on Mar 14, 2011 by rmcveigh
I have a custom type in Alfresco, for the time being it is "sc:mine". Each document of this type has a section property (sc:section). I have several documents that have "ENGL316001" specified as their value for the property sc:section. I want to do a query search to find all documents whose sc:section property is equal to "ENGL316001" but I can't figure out how to do this with Apache Chemistry and the Alfresco OpenCmis extension.

Currently with the following query I can find all documents of type sc:mine.

"select d.*,o.* from cmis:document as d join sc:mine as o on d.cmis:objectid = o.cmis:objectid"
But that is the closest I can get.

How do I specifically search for all sc:mine documents whose sc:section property is equal to "ENGL316001"?

This is the type definition for sc:mine

    <type name="sc:mine">
         <title>My Type</title>
         <parent>cm:content</parent>
         <properties>
            <property name="sc:section">
               <title>Section Number</title>
               <type>d:text</type>
            </property>
            <property name="sc:description">
               <title>Description</title>
               <type>d:text</type>
            </property>
         </properties>
         <mandatory-aspects>
            <aspect>cm:titled</aspect>
         </mandatory-aspects>
      </type>

Outcomes