I'm using this query now: #set($sql = , BaseObject as obj, $proptype as
prop where obj.className='${ISDclassname}' and obj.id=prop.id.id and
prop.name='${viewby}' and doc.fullName=obj.name and doc.fullName!='$
{ISDclasstemplate}' and $xwiki.getDate()-doc.contentUpdateDate15 order by
prop.value)
I had problems with HQL statements containing parentheses used to help
humans see the logic more easily, but not needed by the logic itself. When I
removed the parentheses and changed the equation to take advantage of
built-in operator precedence... then it worked.
I'm not saying that is the