jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Klimetschek <aklim...@adobe.com>
Subject Re: Query: Compare two properties of a node
Date Tue, 02 Jul 2013 18:40:48 GMT
Yes, that's right, you cannot compare 2 properties (would be a join, and there are only few
joins possible based on the node hierarchy containment).

Cheers,
Alex


On 21.06.2013, at 10:39, Ulrich <Forums@gombers.de> wrote:

> I need to compare two DATE-properties and work on those nodes where the first
> date is "after" the other one. From the specs I understand, that in the
> comparison one of the parameters has to be static; so there is no way to do what
> I want.
> And in fact the query:
>  "select [my:ownDate] from [nt:resource] as mynode " +
>  "WHERE ISDESCENDANTNODE([/content/testit]) AND [jcr:lastModified] >
> [my:ownDate]";
> fails with Exception: "javax.jcr.query.InvalidQueryException: Query: ....
> expected: static operand"
> 
> while
>  "select [my:ownDate] from [nt:resource] as mynode " +
>  "WHERE ISDESCENDANTNODE([/content/testit]) AND [jcr:lastModified] >
> '2013-06-12T18:05:59.109+02:00'";
> works fine.
> 
> Did I get this right? Is there a trick? Otherwise I have to traverse all nodes
> (several hundert thousands) day per day.
> 
> Thanks and best regards,
> Ulrich


Mime
View raw message