You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by Alvaro Gonzalez <ag...@germinus.com> on 2006/03/09 18:50:59 UTC
Problem with jcr:deref
Hi everybody.
We have a tree with two branches with references between them (one
branch with categories which reference contents in the other branch).
We would like to search contents that are referenced from certain
category (or its subcategories) and that have certain property set to
whatever. So my XPath query is:
//element(*,nt:category)[@jcr:uuid =
'207e56a3-2581-42cd-9a56-701cc63bd171'][@member]/jcr:deref(@member, '*')
(member is the property reference which links to a content).
This query executes good but if i want to introduce the second constrain
('...the content has some property set to whatever'), so the query would be:
//element(*,nt:category)[@jcr:uuid =
'207e56a3-2581-42cd-9a56-701cc63bd171'][@member]/jcr:deref(@member,
'*')[@property='value']
I get an exception like this:
javax.jcr.query.InvalidQueryException: Unsupported location for jcr:deref()
Why do i get that exception? Is possible to go on navigating the tree
when using jcr:deref?
Regards,
Alvaro
>
>
Re: Problem with jcr:deref
Posted by Marcel Reutegger <ma...@gmx.net>.
Hi Alvaro,
this is a bug in the query builder. could you please file a jira issue?
thanks.
regards
marcel
Alvaro Gonzalez wrote:
> Hi everybody.
>
> We have a tree with two branches with references between them (one
> branch with categories which reference contents in the other branch).
>
> We would like to search contents that are referenced from certain
> category (or its subcategories) and that have certain property set to
> whatever. So my XPath query is:
>
> //element(*,nt:category)[@jcr:uuid =
> '207e56a3-2581-42cd-9a56-701cc63bd171'][@member]/jcr:deref(@member, '*')
>
> (member is the property reference which links to a content).
>
> This query executes good but if i want to introduce the second constrain
> ('...the content has some property set to whatever'), so the query would
> be:
>
> //element(*,nt:category)[@jcr:uuid =
> '207e56a3-2581-42cd-9a56-701cc63bd171'][@member]/jcr:deref(@member,
> '*')[@property='value']
>
> I get an exception like this:
>
> javax.jcr.query.InvalidQueryException: Unsupported location for jcr:deref()
>
> Why do i get that exception? Is possible to go on navigating the tree
> when using jcr:deref?
>
> Regards,
> Alvaro
>
>
>>
>>
>