using Query Module (XWiki.org) I have the following hql query that succesfully returns the (appwithinminutes) pages where the page property ‘Producten’ has the currently viewed page as an entry;
#set ($search= $services.query.xwql("select distinct doc.fullName from XWikiDocument as doc, BaseObject as obj, DBStringListProperty as prop join prop.list list where obj.name=doc.fullName and obj.className='Main.Producten.Componenten.Code.ComponentenClass' and obj.id=prop.id.id and prop.id.name='Producten' and list = '$doc.FullName' "))
I’d like this query to also sort by the value of the (appwithinminutes) pages (static list) property named ‘Type’ , but I’m failing to add this staticlist property of the page to the query.
I’ve attempted (among other things) adding a second
DBStringListProperty as typeprop where obj.className='Main.Producten.Componenten.Code.ComponentenClass' and typeprop.id.name='Type'
But this is giving errors
I also attempted using the XWiki-specific extensions
- where doc.object(Class).prop = ‘something’
order by doc.Type
but it fails to resolve this Property (I assume because it’s a specific class property)
Any suggestions how to do this in the query?
I think I can do a workaround in velocity but think it’d be cleaner to do the sorting in the query directly.
Thanks in advance!