jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alejandro Gomez <alejandro.go...@gmail.com>
Subject Re: jcr-sql2 jcr:path property not present, then how can I do to reference paths? ...
Date Thu, 29 Jul 2010 11:37:24 GMT
Thanks Alexander!

That's what I supposed it would happen...

So I think that a way to achieve my goal is to add another property to
the  secondselector node and use it for the equijoin condition...

On Thu, Jul 29, 2010 at 6:21 AM, Alexander Klimetschek <aklimets@day.com> wrote:
> On Thu, Jul 29, 2010 at 00:12, Alejandro Gomez
> <alejandro.gomez@gmail.com> wrote:
>> Hi everyone,
>>
>> I'm using jackrabbit 2.1.0, and jcr-sql2 for queries.
>>
>> I have read in past emails that  "...SQL-2 does not support the jcr:path pseudo
>> property, which is only present in JCR 1.0 SQL."
>>
>> Now, I would like to know how can I do (if possible) to reference to a
>> node's path, for example, I would like to have a query like below:
>>
>> SELECT * from [nt:firstnodetype] as firstselector
>> INNER JOIN [nt:secondnodetype] as secondselector" +
>> ON secondselector.[jcr:path] = firstselector.selectorpath"
>>
>> firstselector.selectorpath is a string property for firstnodetype
>> nodes that holds the path of a secondnodetype node.
>>
>>
>>
>> Does anyone wonder a valid way to reference paths? I read the jcr2
>> spec and I couldn't see light on this subject...
>
> This would be a dynamic join based path of a node and the (path) value
> of a property of another node... I think this is not covered by the 4
> join conditions (EquiJoin, IsSameNode, IsChildNode and
> IsDescendantNode).
>
> BTW: http://www.h2database.com/jcr/grammar.html might help in "browsing".
>
> Regards,
> Alex
>
> --
> Alexander Klimetschek
> alexander.klimetschek@day.com
>



-- 
Lo que creas de los demás estará signado por lo que creas de ti mismo,
y del mismo modo los hechos de tu vida.

Mime
View raw message