jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Morrell Jacobs <mjac...@maned.com>
Subject JCR-SQL2 Query Problem With Joins
Date Mon, 06 Oct 2014 17:21:08 GMT
Setup: I want to run a JCR-SQL2 query that selects nodes based on an attribute of a descendant
node.

I have created the query (see below) that does the work, but returns both nodes (the ancestor
& descendant).  From the googling, “SELECT parent.*” should cause the query to only
return the ancestors / parent nodes, but I haven’t been able to get it to work.

Looking for advice - what am I doing wrong? - or whether anyone else has seen this problem.

Thanks
Morrell



Query:

SELECT parent.* FROM [ancestorNodeType] AS parent INNER JOIN [descendantNodeType] as child
ON ISDESCENDANTNODE(child,parent) WHERE child.[descendantProperty] = CAST('true' AS BOOLEAN)



Mime
View raw message