jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nicolas Betheuil" <Nicolas.Bethe...@europe.adp.com>
Subject RE: xpath query of subnode
Date Thu, 25 Nov 2010 11:07:59 GMT

Only to complete and tell when i'm gone, i think i will follow your work arround. 

I try to make the request in SQL2 and it's works pretty well when the repo is loaded in local,
in the same JVM (TranscientRepository).
Here is the query

select * from [nt:unstructured] as a
right outer join [nt:unstructured] as c on isdescendantnode(a, c)
where localname(c) = 'conditions'

When I try to make the same test with a remote repo with davex, the query fails. When i remove
the join the query don't fail.
I try to select only a.* elements on a.title (one of my attributes) but it's same.

javax.jcr.RepositoryException: More than one selector. Use getPath(String) instead. 

[1] http://jackrabbit.510166.n4.nabble.com/Performance-of-SQL-2-versus-XPATH-td1590422.html
[2] https://issues.apache.org/jira/browse/JCR-2535

-----Message d'origine-----
De : Alexander Klimetschek [mailto:aklimets@adobe.com] 
Envoyé : mercredi 24 novembre 2010 17:51
À : users@jackrabbit.apache.org
Objet : Re: xpath query of subnode

On 24.11.10 16:56, "Nicolas Betheuil" <Nicolas.Betheuil@europe.adp.com>
wrote:

>Thank's for your quick answer but it's seems doesn't work. I speak about
>the not function of course. The other part (/aRootNode/subNode//*) is
>working expect that the root of a repo is always jcr:root and the
>rootNode is of course under this node. That was a mistake in my first
>post but like it's something i understand i want to make it available to
>everyone.

Might be that not() doesn't work properly with nodes and/or same-name
siblings. I thought it would do.

As a workaround, you could set a property like "hasConditions" or
"noConditions" on your target nodes and query for them: "@hasConditions =
false".

Regards,
Alex

-- 
Alexander Klimetschek
Developer // Adobe (Day) // Berlin - Basel





Mime
View raw message