query by jointing multiple aspects
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-19-2013 02:50 AM
I have a situation which requires query over multiple aspects. I can find examples which join cmis:document and cm:some_aspects, such as
"select t.*, d.* from cmis:document as d join cm:author as t on d.cmisbjectid = t.cmisbjectid where t.cm:author='ianrankin' "
The question is how to join multiple aspects? Where can I find the specifications?
Thanks.
"select t.*, d.* from cmis:document as d join cm:author as t on d.cmisbjectid = t.cmisbjectid where t.cm:author='ianrankin' "
The question is how to join multiple aspects? Where can I find the specifications?
Thanks.
Labels:
- Labels:
-
Archive
3 REPLIES 3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-19-2013 03:35 AM
You can join multiple aspects like this :
select t.*, d.*, e.* from cmis:document as d
join cm:author as t on d.cmisbjectId = t.cmisbjectId
join exif:exif e on d.cmisbjectId = e.cmisbjectId
where t.cm:author='Emmanuel Carbenay'
and e.exif:manufacturer = 'Canon'
Simply chain your JOIN predicates
Emmanuel
select t.*, d.*, e.* from cmis:document as d
join cm:author as t on d.cmisbjectId = t.cmisbjectId
join exif:exif e on d.cmisbjectId = e.cmisbjectId
where t.cm:author='Emmanuel Carbenay'
and e.exif:manufacturer = 'Canon'
Simply chain your JOIN predicates
Emmanuel
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-21-2013 07:59 PM
Hi Emmanuel,
That's exactly what I tried before I posted this question. But I got exception as below:
org.apache.chemistry.opencmis.commons.exceptions.CmisInvalidArgumentException: No selector for
at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.convertStatusCode(AbstractAtomPubService.java:423)
at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.post(AbstractAtomPubService.java:570)
at org.apache.chemistry.opencmis.client.bindings.spi.atompub.DiscoveryServiceImpl.query(DiscoveryServiceImpl.java:142)
at au.com.SearchService.searchDocsFromRepository(SearchService.java:132)
That's exactly what I tried before I posted this question. But I got exception as below:
org.apache.chemistry.opencmis.commons.exceptions.CmisInvalidArgumentException: No selector for
at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.convertStatusCode(AbstractAtomPubService.java:423)
at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.post(AbstractAtomPubService.java:570)
at org.apache.chemistry.opencmis.client.bindings.spi.atompub.DiscoveryServiceImpl.query(DiscoveryServiceImpl.java:142)
at au.com.SearchService.searchDocsFromRepository(SearchService.java:132)
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-21-2013 08:55 PM
rechecking my code and found I made a simple mistake. the join works fine, but when I compose the where condition, I forget to use the alias.
So problem solved.
So problem solved.