Hello again,
Quick question, regarding the built-in 'Tags' page, that builds a list of
all the tags being used in the XWiki instance.
I would like to have this list being rendered in alphabetical order, instead
of in a random order (or by creation date), but all the 'order by' clauses
I've tried have either not worked at all, not worked in the desired mannor,
or thrown exceptions.
The HQL statement provided by XWiki is as follows:
#set($sql = "select distinct elements(prop.list) from BaseObject as obj,
DBStringListProperty as prop where obj.className='XWiki.TagClass' and
obj.id=prop.id.id and prop.id.name='tags' order by obj asc")
And I've tried the following 'order by' clauses:
order by obj.name asc
order by obj.fullName asc
order by obj asc
order by doc.name asc
order by doc.fullName asc
order by doc asc
order by prop asc
order by prop.value asc
None of these seem to produce the list in alphabetical order, although some
of them do change the order in which the tags are displayed. Any ideas on
how to get this order by clause working to produce the tag list in
alphabetical order?
I have a feeling my difficulty lies in that the property is a
DBStringListProperty in the database, but I'm not sure how to work with
these.
Thanks ahead of time guys.
--
View this message in context:
http://n2.nabble.com/Help-with-%27order-by%27-clause-in-HQL-tp1455693p14556…
Sent from the XWiki- Users mailing list archive at
Nabble.com.