You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Stanislav Orlenko <or...@gmail.com> on 2013/09/20 00:28:48 UTC
jcr:path
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
Thanks
Re: jcr:path
Posted by Alexander Klimetschek <ak...@adobe.com>.
On 19.09.2013, at 15:28, Stanislav Orlenko <or...@gmail.com> 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