jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig S. Dickson" <cr...@thejuggernautgroup.com>
Subject Query for nodes based on presence of descendant nodes
Date Tue, 12 Apr 2011 19:02:18 GMT

I would like to query for nodes based on the presence of a descendant node. In psuedo code,
something like:

select * from nt:base where hasDescendant('./relative/path/to/descendant/node')

I am trying to create the query with SQL2 and I can see the ischild() and isdescendant() constraints,
but I am not clear how to use them to query for and return the parent/ancestor nodes, instead
of the child/descendant nodes.

Is this possible? I would prefer and SQL2 answer, but can use QOM or XPath if necessary.

Thanks in advance.


View raw message