Hi,
Ok you need to add this property in the query
#set ($sql = ", BaseObject as obj, DBStringListProperty as prop join prop.list list,
StringProperty as locprop join obj.id=locprop.id.id and locprop.id.name='location'
where obj.name=doc.fullName and
obj.className='Photos.PhotoClass' and
obj.name<>'Photos.PhotoClassTemplate'
and obj.id=prop.id.id and prop.id.name='category' and list='${category}'
order by locprop.value")
Ludovic
Brian D. Switzer a écrit :
Sorry, that's not quite what I meant. My example
wasn't very clear. Let's
assume the class Photos.PhotoClass has a property called "location"
indicating where the photo was taken. I'd like to be able to sort by that
"location" property.
You can try
#set ($sql = ", BaseObject as obj, DBStringListProperty as prop join
prop.list list where obj.name=doc.fullName and
obj.className='Photos.PhotoClass' and
obj.name<>'Photos.PhotoClassTemplate'
and obj.id=prop.id.id and prop.id.name='category' and list='${category}'
order by doc.creationDate")
or
#set ($sql = ", BaseObject as obj, DBStringListProperty as prop join
prop.list list where obj.name=doc.fullName and
obj.className='Photos.PhotoClass' and
obj.name<>'Photos.PhotoClassTemplate'
and obj.id=prop.id.id and prop.id.name='category' and list='${category}'
order by doc.date")
depending if you want to sort by the creation
date or update date of the
documents
------------------------------------------------------------------------
--
You receive this message as a subscriber of the xwiki-users(a)objectweb.org mailing list.
To unsubscribe: mailto:xwiki-users-unsubscribe@objectweb.org
For general help: mailto:sympa@objectweb.org?subject=help
ObjectWeb mailing lists service home page:
http://www.objectweb.org/wws