cancel
Showing results for 
Search instead for 
Did you mean: 

CMIS Association Query

albertogarcía
Champ in-the-making
Champ in-the-making
Hi,

I have searched the way of making simple joins with CMIS in Alfresco, but can't find the way to write what I want.

I have a custom model with an association like this

<association name="actaSmiley SurprisedrdenDia">
   <title>Orden del dia</title>
      <target>
        <class>cm:content</class>
        <mandatory>false</mandatory>
        <many>true</many>
      </target>
</association>

When I get the node, i can normally access to the assocition, get the documents… but now I want to make a query like:

select * from acta:acta a join cm:content c on a.actaSmiley SurprisedrdenDia = c.cmisSmiley SurprisedbjectID where (some conditions from both parts)

I can't get the way to do the query.

¿Any ideas? Thanks in advance for the help

Alberto
3 REPLIES 3

mrogers
Star Contributor
Star Contributor
Join is not supported on 4.2

sandeepreddy
Champ in-the-making
Champ in-the-making
Hi Mrogers,
Please help me i am facing timestamp error

albertogarcía
Champ in-the-making
Champ in-the-making
Hi mrogers,

I have executed some querys found in some examples, such as:
SELECT * FROM cmis:document d join cm:titled t on d.cmisSmiley SurprisedbjectId = t.cmisSmiley SurprisedbjectId

or (adapting it to my models)
SELECT * FROM cmis:document d join acta:acta t on d.cmisSmiley SurprisedbjectId = t.cmisSmiley SurprisedbjectId

And are working, but can't find the way to get the id of the document in the association for the query (instead of d.cmisSmiley SurprisedbjectId, I need the associaton document ID).

Regards,
Alberto