You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@chemistry.apache.org by Andrew Lubochkin <al...@elilink.com> on 2012/12/19 16:39:52 UTC

problem with CMIS query syntax

Hello,

 

I'm using DotCMIS library 0.5.0.0 version for creating query for searching
in Alfresco. When I'm trying to use cmis:parentId for a document I'm having
some incorrect behavior.

 

ftSQueryText:  SELECT * FROM cmis:document WHERE cmis:parentId =
'workspace://SpacesStore/1ed59f3c-1031-4b9d-a079-8d9bf8c5fb3e'

 

Then when i'm trying to create the query by the following code:

 

IItemEnumerable<IQueryResult>  q = Session.Query(ftSQueryText, false);

 

the object q is the following:

 



 

and after that when I'm trying to invoke Select method as shown below:

 

return q.Select(BuildDocByQueryResult).ToList();

 

I'm receiving the following exception:

 



 

I think the reason is in cmis:parentId field that I'm trying to use in my
query condition.

 

May be you will be able to provide some information about this issue please.

 

Best regards,

 

Andrew Lubochkin

 

phone: (+37529)5083043

skype: androgen86

 


Re: problem with CMIS query syntax

Posted by Florian Müller <fm...@apache.org>.
Hi Andrew,

The property "cmis:parentId" is only defined for the "cmis:folder" type, 
but not for the "cmis:document" type. You cannot use this property when 
you are querying documents.


- Florian


> Hello,
>
> I'm using DotCMIS library 0.5.0.0 version for creating query for
> searching in Alfresco. When I'm trying to use cmis:parentId for a
> document I'm having some incorrect behavior.
>
> *ftSQueryText:* SELECT * FROM cmis:document WHERE cmis:parentId =
> 'workspace://SpacesStore/1ed59f3c-1031-4b9d-a079-8d9bf8c5fb3e'
>
> Then when i'm trying to create the query by the following code:
>
> IItemEnumerable<IQueryResult> q = Session.Query(ftSQueryText, false);
>
> the object *q* is the following:
>
> and after that when I'm trying to invoke Select method as shown below:
>
> returnq.Select(BuildDocByQueryResult).ToList();
>
> I'm receiving the following exception:
>
> I think the reason is in *cmis:parentId* field that I'm trying to use in
> my query condition.
>
> May be you will be able to provide some information about this issue please.
>
> Best regards,
>
> Andrew Lubochkin
>
> phone: (+37529)5083043
>
> skype: androgen86
>
>
>
> __________ Information from ESET NOD32 Antivirus, version of virus
> signature database 7100 (20120501) __________
>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.esetnod32.ru/.ml

Re: problem with CMIS query syntax

Posted by Florent Guillaume <fg...@nuxeo.com>.
We can't read your email, the pictures are stripped.

Florent


On Wed, Dec 19, 2012 at 4:39 PM, Andrew Lubochkin <al...@elilink.com>wrote:

>  Hello,****
>
> ** **
>
> I'm using DotCMIS library 0.5.0.0 version for creating query for searching
> in Alfresco. When I'm trying to use cmis:parentId for a document I'm having
> some incorrect behavior.****
>
> ** **
>
> *ftSQueryText:*  SELECT * FROM cmis:document WHERE cmis:parentId =
> 'workspace://SpacesStore/1ed59f3c-1031-4b9d-a079-8d9bf8c5fb3e'****
>
> ** **
>
> Then when i'm trying to create the query by the following code:****
>
> ** **
>
> IItemEnumerable<IQueryResult>  q = Session.Query(ftSQueryText, false);****
>
> ** **
>
> the object *q* is the following:****
>
> ** **
>
> ****
>
> ** **
>
> and after that when I'm trying to invoke Select method as shown below:****
>
> ** **
>
> return q.Select(BuildDocByQueryResult).ToList();****
>
> ** **
>
> I'm receiving the following exception:****
>
> ** **
>
> ****
>
> ** **
>
> I think the reason is in *cmis:parentId* field that I'm trying to use in
> my query condition.****
>
> ** **
>
> May be you will be able to provide some information about this issue
> please.****
>
> ** **
>
> Best regards,****
>
> ** **
>
> Andrew Lubochkin****
>
> ** **
>
> phone: (+37529)5083043****
>
> skype: androgen86****
>
> ** **
>
>
> __________ Information from ESET NOD32 Antivirus, version of virus
> signature database 7100 (20120501) __________
>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.esetnod32.ru/.ml
>



-- 
Florent Guillaume, Director of R&D, Nuxeo
Open Source, Java EE based, Enterprise Content Management (ECM)
http://www.nuxeo.com   http://www.nuxeo.org   +33 1 40 33 79 87