I did it!
{{velocity}}
#set($class="XWiki.XWikiComments")
#set($name=$doc.fullName)
#set($xwlquery="select obj.comment from Document doc, doc.object($class) as
obj where doc.fullName='$doc.fullName' order by obj.date desc")
#set($list=$services.query.xwql($xwlquery).setLimit(1).execute())
#foreach($item in $list)
$item
#end
{{/velocity}}
--
View this message in context:
http://xwiki.475771.n2.nabble.com/get-last-comment-of-some-document-tp70576…
Sent from the XWiki- Users mailing list archive at
Nabble.com.