jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Charles Flond <cfl...@jahia.com>
Subject Keep nodes order with JCR-SQL2 queries
Date Mon, 02 May 2011 13:44:10 GMT
Hello,

I am currently trying to do the following scenario :

I have a node of type "jnt:contentList" named "maincontent" which is defined
as "orderable" in the JCR. Its path is "/sites/demo/home/maincontent/".
Under this node, I have several others nodes, ordered by myself (no
automatic sort on dates ...).

Now, I perform a JCR-SQL2 query like that : select * from [jnt:content] as
content where ISDESCENDANTNODE(content,'/sites/demo/home/maincontent/')

I retrieve my maincontent's subnodes, but I lost the order ! Is there a way
to keep it ?

To summarize :

The original list :

- mainContent
-- nodeA
-- nodeB
-- nodeE
-- nodeC

The list generated by the query :

-SQL2QueryTargetingMainContent
--nodeC
--nodeB
--nodeA
--nodeE

Thanks in advance for your help !

Charles

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message