jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Parvulescu <alex.parvule...@gmail.com>
Subject Re: Query for nodes based on presence of descendant nodes
Date Wed, 13 Apr 2011 15:40:50 GMT
Hi Craig,

I don't think sql2 has something like that.

could you be a bit more specific with your usecase? I can't figure out what
you are trying to do :)
are you looking for a certain parent of a node? or parents of node types?

wouldn't it be easier to have a property on the parent node to indicate the
presence of certain child node(s) / (types)?


On Tue, Apr 12, 2011 at 9:02 PM, Craig S. Dickson <
craig@thejuggernautgroup.com> wrote:

> Hi,
> 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.
> Craig

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message