On Feb 26, 2008, at 11:39 AM, Ralf Hirning wrote:

Hi Ruben,

maybe it is easier to use XPATH:

"//[EMAIL PROTECTED]:lastmodified > xs:dateTime ('2008-02-01T00:00:00.000+01:00')] order by @mgnl:lastmodified"

will do the job

Ralf

I tested that on mine and it works as well... even though SQL syntax is supported in level-2 JCR repositories, reading over the spec left me with the impression that it's kind of the ugly step child of the JCR spec. Even though I already knew SQL fairly well, I found that learning Xpath syntax was a lot easier than trying to get jackrabbit to do my bidding in SQL JCR queries... YMMV of course.

Oh - and I set the result type to "mgnl:content" to make it return content nodes only - setting the result type to nt:base will obviously give you more than what you want.

Ryan


Ruben Reusser schrieb:
Ralf,

thanks for the help - I tried that but it does not work - switching the > to a < does not return any pages. I tried it as well on the demo instance at magnolia

Ruben

Ralf Hirning wrote:
Hi Ruben,

you have to specify the date as

xs:dateTime('2009-01-01T00:00:00.000+01:00')

so your query should look like this

select * from mgnl:metaData where jcr:path like '/%' and mgnl:lastmodified > xs:dateTime('2009-01-01T00:00:00.000+01:00') order by mgnl:lastmodified

Ralf

Ruben Reusser schrieb:


on 3.5.4, I tried to do a query that returns only pages modified after a certain date:

select * from mgnl:metaData where jcr:path like '/%' and mgnl:lastmodified > '2009-01-01' order by mgnl:lastmodified

this however returns all nodes instead of no nodes. Am I doing something wrong here?

thanks

Ruben

----------------------------------------------------------------
for list details see
http://documentation.magnolia.info/docs/en/editor/stayupdated.html
----------------------------------------------------------------


----------------------------------------------------------------
for list details see
http://documentation.magnolia.info/docs/en/editor/stayupdated.html
----------------------------------------------------------------


----------------------------------------------------------------
for list details see
http://documentation.magnolia.info/docs/en/editor/stayupdated.html
----------------------------------------------------------------


----------------------------------------------------------------
for list details see
http://documentation.magnolia.info/docs/en/editor/stayupdated.html
----------------------------------------------------------------


----------------------------------------------------------------
for list details see
http://documentation.magnolia.info/docs/en/editor/stayupdated.html
----------------------------------------------------------------

Reply via email to