On Tue, Jan 20, 2009 at 11:33 AM, Jean-Vincent Drean <jv(a)xwiki.com> wrote:
Hi devs,
XWikiDocument.java
public List<String> getChildren(XWikiContext context) throws XWikiException
{
String hql ="select doc.fullName from XWikiDocument doc " +
"where doc.parent='" + getFullName() + "'
order by
doc.space, doc.name";
return context.getWiki().search(hql, context);
}
{{/code}}
Note: I've put doc.space and doc.name in the order by clause since
getting pages in the 'absolute' alphabetical order afterwards is easy
using util.sort while the contrary is not true.
Note: I must be tired, ordering by doc.fullName will work just the
same, sorry for the noise.
So the only question is do we put an order by clause here or do we
rely on util.sort.
+1 for keeping an order by clause.