cancel
Showing results for 
Search instead for 
Did you mean: 

[HELP]Retrieve extended properties

jayxm1106
Champ in-the-making
Champ in-the-making
Hi there,

I want to retrieve extended properties in specified folder through CMIS.

First ,
select * from cmis:document where IN_FOLDER('"+ objectFolderId +"')  
is OK.

But When i use join condition,  IN_FOLDER can't work.
Here is my code.
      
   sql = " select d.*, t.* " +
               "   from cmis:document  as d " +
               "   join cm:titled      as t on d.cmis:objectId = t.cmis:objectId" +
               " where IN_FOLDER('"+ objectFolderId +"') ";
Could anyone help me to correct that?
Thanks!
5 REPLIES 5

jayxm1106
Champ in-the-making
Champ in-the-making
Anyone, Help, Please.

talija83
Champ in-the-making
Champ in-the-making
Maybe the object in question doesn't have an cm:titled aspect?  :?:

jayxm1106
Champ in-the-making
Champ in-the-making
Maybe the object in question doesn't have an cm:titled aspect?  :?:

Hi,talija83, thanks for your reply.

But i can get the right result by
   sql = " select d.*, t.* " +
               "   from cmis:document  as d " +
               "   join cm:titled      as t on d.cmis:objectId = t.cmis:objectId"

and
select * from cmis:document where IN_FOLDER('"+ objectFolderId +"') 

but failed query the data if i use the CMIS SQL below:
   sql = " select d.*, t.* " +
               "   from cmis:document  as d " +
               "   join cm:titled      as t on d.cmis:objectId = t.cmis:objectId" +
               " where IN_FOLDER('"+ objectFolderId +"') ";

How to let IN_FOLDER work?

andy
Champ on-the-rise
Champ on-the-rise
Hi

To use IN_FOLDER with join you have to specify the qualifier.
It needs to know where to apply the constraint.

You use the alias for the table in the IN_FOLDER

SELECT D.*, O.* FROM CMISSmiley Very HappyOCUMENT AS D JOIN CMSmiley SurprisedWNABLE AS O ON D.cmisSmiley SurprisedbjectId = O.cmisSmiley SurprisedbjectId WHERE IN_FOLDER(D, 'SOME_ID')

Andy

jayxm1106
Champ in-the-making
Champ in-the-making
Hi

To use IN_FOLDER with join you have to specify the qualifier.
It needs to know where to apply the constraint.

You use the alias for the table in the IN_FOLDER

SELECT D.*, O.* FROM CMISSmiley Very HappyOCUMENT AS D JOIN CMSmiley SurprisedWNABLE AS O ON D.cmisSmiley SurprisedbjectId = O.cmisSmiley SurprisedbjectId WHERE IN_FOLDER(D, 'SOME_ID')

Andy


Yeah,It's work. Thanks a lot and sorry for my late reply.