jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dave Brosius" <dbros...@mebigfatguy.com>
Subject FW: Search for creation dates - help
Date Fri, 21 Mar 2008 16:53:43 GMT

OK, so i realized that i was missing a prefix for the deref method, so the new query is this

//*[@jcr:primaryType = 'prm:File' and jcr:deref(@jcr:baseVersion, nt:version)/jcr:content/@jcr:lastModified
>= xs:dateTime('2000-01-01T00:00:00.000-05:00')] order by jcr:score() descending

now i'm getting an exception:

javax.jcr.query.InvalidQueryException: Unsupported location for jcr:deref()
	at org.apache.jackrabbit.core.query.xpath.XPathQueryBuilder.createFunction(XPathQueryBuilder.java:967)
	at org.apache.jackrabbit.core.query.xpath.XPathQueryBuilder.visit(XPathQueryBuilder.java:515)
	at org.apache.jackrabbit.core.query.xpath.SimpleNode.jjtAccept(SimpleNode.java:80)
	at org.apache.jackrabbit.core.query.xpath.SimpleNode.childrenAccept(SimpleNode.java:89)
	at org.apache.jackrabbit.core.query.xpath.XPathQueryBuilder.visit(XPathQueryBuilder.java:551)
	at org.apache.jackrabbit.core.query.xpath.SimpleNode.jjtAccept(SimpleNode.java:80)
	at org.apache.jackrabbit.core.query.xpath.SimpleNode.childrenAccept(SimpleNode.java:89)
	at org.apache.jackrabbit.core.query.xpath.XPathQueryBuilder.createExpression(XPathQueryBuilder.java:707)
	at org.apache.jackrabbit.core.query.xpath.XPathQueryBuilder.visit(XPathQueryBuilder.java:488)
[snip...]

I see a possibly similar bug that was fixed: JCR-338



-----Original Message-----
From: Dave Brosius <dbrosius@mebigfatguy.com>
Sent: Thursday, March 20, 2008 7:15pm
To: users@jackrabbit.apache.org
Subject: Search for creation dates - help

I am trying to put together a query for when the creation date of a nt:file derived object
is greater than some date. I've tried

//*[@jcr:primaryType = 'prm:File' and deref(@jcr:baseVersion, nt:version)/@jcr:lastModified
>= xs:dateTime('2000-01-01T00:00:00.000-05:00')] order by jcr:score() descending


This doesn't seem to work at the moment, Am i off base here?



Mime
View raw message