jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ulrich <For...@gombers.de>
Subject Query: Compare two properties of a node
Date Fri, 21 Jun 2013 08:39:19 GMT
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