Thanks this is a giant help. I'm struggling to understand the connection between hibernate objects and XWiki objects. For example when I wanted to restrict the documents to a particular "space" I thought I should code "and doc.space = '$space'" but I needed to code "and doc.web = '$space'" but I kind of guessed this because the hibernate created the XWIKIDOC table with a XWD_WEB column. So, I thought there should be java classes that exposed methods hibernate would call to serialize objects to database but I'm not sure where to look for these. Thanks again for the help here is the script to list the unique set of Blog Authors within a single space. #set ($space = "some_space") #set ($start = 0) #set ($nb = 50) #set ($sql = "select distinct doc.creator from XWikiDocument doc, BaseObject obj where doc.fullName = obj.name and doc.web = '$space' and obj.className = 'XWiki.ArticleClass'") #set ($collect = $xwiki.search($sql , $nb , $start)) #foreach ($item in $collect) #if ($xwiki.hasAccessLevel("view", "${context.database}:${item}")) #set($bentrydoc = $xwiki.getDocument($item)) #set($pos =$bentrydoc.creator.indexOf(".")+1) #set($blogauthor = $bentrydoc.creator) #set($realName = $xwiki.getLocalUserName($blogauthor, false)) * $realName \\ #end #end -- View this message in context: http://www.nabble.com/distict-blog-authors-tp17367672p17405328.html Sent from the XWiki- Dev mailing list archive at Nabble.com.