jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Datenheld <Datenh...@gmx.de>
Subject Select jcr:path in JCR SQL2
Date Sun, 17 Nov 2013 19:30:04 GMT
Hi again,

here's a question about jcr:path in queries.

Consider the following query:

SELECT base.[jcr:path], content.[jcr:lastModified], 
content.[jcr:lastModifiedBy] FROM [nt:base] as base LEFT OUTER JOIN 
[nt:resource] as content ON ISCHILDNODE(content, base) WHERE 
((base.[jcr:primaryType] = 'nt:file' OR base.[jcr:primaryType] = 
'nt:folder') AND ISCHILDNODE(base, ['/some/path']))

How come that base.[jcr:path] is always null? I read somewhere on the 
web that jcr:path is a time-intensive calculation and that the field can 
be omitted. Can I force the query to calculate the path?

The whole point of this is a performance optimiziation. As NodeIterator 
is slow and the query is fast I wanted to operate on paths only.  Sadly, 
I can now get anything very fast, but the most important thing - the path.

So, is there a way to retrieve the paths when you have a query with 
joins? Or will I really have to call row.getPath("<selector>") which 
slows everything down again.

Best regards,
Datenheld

Mime
View raw message