If you're sure you're getting the exact same node back multiple times that would be a bug in the JCR I think. Are you sure you aren't mistaken? I'd look at the test cases (JUnits, of the actual JCR codebase) that exist for doing "inner joins" (because that code should be known to work), and see if you can look for the closest example in there to what you are doing. Lots of times the only way to really know what to do in Jackrabbit is look at the actual code, because so few shops are using JCR yet.
Best regards, Clay Ferguson [email protected] On Wed, Jan 27, 2016 at 7:36 PM, Torgeir Veimo <[email protected]> wrote: > I have a query where I select nodes of a type based on values in some child > nodes of those nodes, thus I use a isdescendantnode. This causes some > entries to be returned twice in the results, if those nodes have multiple > children where some children meet the first criteria, and some the other. > > Is there a way to avoid this by using a different query? > > select asset.* from [ka:asset] as asset > inner join [ka:asset] as agreement on isdescendantnode(agreement, asset) > where agreement.[ka:assetType] = 'agreement' > and asset.[ka:assetType] = 'company' > and (agreement.[ka:owner] = '5e9d5632-c219-44bd-b6e1-f96e9f3ff37e' or > agreement.[ka:owner] = '731f35f6-e205-4a53-8ca8-144a6f7dec26') > > > -- > -Tor >
