cancel
Showing results for 
Search instead for 
Did you mean: 

Problems to consult properties of a aspect

arak
Confirmed Champ
Confirmed Champ
Hi everyone,

I have problems to consult properties of a aspect of a custom type, constantly I get the next message "Type is unsupported in query: mc:myaspect".

This is my CMIS query:


select
d.*,
o.*
from
cmis:document as d
join
mc:myAspect as o
on
d.cmis:objectid = o.cmis:objectid
where
o.mc:myProperty = 'ev1'


And this is my custom model:


<?xml version="1.0" encoding="UTF-8"?>

<model name="mc:myModel" xmlns="http://www.alfresco.org/model/dictionary/1.0">

    <imports>
        <import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d" />
        <import uri="http://www.alfresco.org/model/content/1.0" prefix="cm" />
    </imports>

    <namespaces>
        <namespace uri="http://www.mc.cl/model/content/1.0" prefix="mc" />
    </namespaces>

    <types>
        <type name="mc:myType">
            <parent>cm:content</parent>
        </type>
       
     </types>
       
     <aspects>
       <aspect name="mc:myAspect">
         <properties>
      <property name="mc:myProperty">
        <type>d:text</type>
        <mandatory>true</mandatory>
        <index enabled="true">
      <atomic>true</atomic>
      <stored>false</stored>
      <tokenised>true</tokenised>
        </index>
      </property>
    </properties>
       </aspect>
     </aspects>

</model>


Someone any idea that it can be?

Thanks for any help.

Greetings,
Pablo.
4 REPLIES 4

angelborroy
Community Manager Community Manager
Community Manager
Maybe you have to change <CODE>mc:my aspect</CODE> by <CODE>mc:myAspect</CODE> in your query?
Hyland Developer Evangelist

arak
Confirmed Champ
Confirmed Champ
I'm sorry, in the original query I use mc:myAspect.

I still continued with the error.

Any idea?

Thanks in advance,
Pablo.

angelborroy
Community Manager Community Manager
Community Manager
It should work, have you try with a more simple query?
<CODE>
select * from mc:myAspect where mc:myProperty = 'ev1'
</CODE>
Hyland Developer Evangelist

arak
Confirmed Champ
Confirmed Champ
Hi,

The problem is solved: In my service-context.xml I had my content model definition in the incorrect bean tag (into of the workflow bean), and so my content model was never charged. I add my content model definition to the correct bean tag (into of the dictionary bean) and all it works.

Thanks Angel for your attention.

Greetings,
Pablo Arak.