jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "oliver.gregory@gmail.com" <oliver.greg...@gmail.com>
Subject JCR_SQL2 left join on [nt:file]
Date Wed, 14 Nov 2012 22:26:49 GMT
Hello,

I'm using jackrabbit 2.4.3. I don't understand a result in the join query.

This is my code :

String expression = ..query..;
QueryManager queryMgr = session.getWorkspace().getQueryManager();
Query query = queryMgr.createQuery(expression.toString(),Query.JCR_SQL2);
QueryResult result = query.execute();
Node node = result.getNodes().nextNode();


When I do this query :
select node.* from [nt:unstructured] as node
it return one element.

But When I do :
select node.* from [nt:unstructured] as node
left outer join [nt:file] as file on ischildnode(file, node)
left outer join [nt:resource] as filecontent on ischildnode(filecontent,
file)
Doesn't return any element :
java.util.NoSuchElementException
    at
org.apache.jackrabbit.jcr2spi.query.NodeIteratorImpl.nextNode(NodeIteratorImpl.java:110)

When i do a left join, I expect to have at least the element on the FROM.
Did I miss something ?

Thanks,

Grégory OLIVER

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message