On 19.09.2013, at 15:28, Stanislav Orlenko <[email protected]> wrote:
> How to implement similar select with JCR 2.0? > > select * from cq:Page where jcr:path = > '/content/company/%/support/downloads' > > I cannot find something like a pseudo-property jcr:path for JCR 2.0 First of all and most importantly, such queries should not be done, but using the JCR API in the first place using iteration, this will be more performant and scale much better. You can still use Xpath and JCR-SQL with Jackrabbit 2.x, they are only deprecated in the spec. In SQL2, there are some new conditions - a fixed path query would look like this: Select * from [cq:Page] as page WHERE ISDESCENDANTNODE(page, [/content/company/foo/support/downloads]) With a join, you might be able to get the wildcard step. Here are some helpful SQL2 railroad diagrams: http://www.h2database.com/jcr/grammar.html HTH, Alex
