On 13/01/2015 05:21, Torgeir Veimo wrote:
> I'm in need of ordering some node in a query based on the latest
> timestamp on one or more child nodes.
>
> This is similar to an article with comments as child nodes, where one
> would like to order the articles in a query sorted by the last
> timestamp on the comments to each article.
>
> This doesn't seem to be work using an XPATH query, with a child node
> designator as eg */@createdProperty. IS this possible to do using
> either SQL2 or by using the QOM?
>
Don't know off the top of my head the actual details but probably you
can achieve it with inner joins.

http://www.day.com/maven/jcr/2.0/6_Query.html#6.7.5%20Join

HTH
Davide


Reply via email to