I found this:
http://platform.xwiki.org/xwiki/bin/view/DevGuide/velocityHqlExamples#HPrivilegedAPI28search3ADocuments2CObjects2CProperties2Cetc29

Getting documents where objects' properties equals some value

#displayQuery(select doc.fullName from XWikiDocument doc, BaseObject obj,
StringProperty prop where doc.fullName=obj.name and
obj.className='XWiki.XWikiUsers' and prop.id.id=obj.id and
prop.name='first_name' and prop.value='Jean-Vincent' true)

What is #displayQuery ? So I guessed and tried this:

#set ($sql = "select doc.author from XWikiDocument doc, BaseObject obj,
StringProperty prop where doc.author=obj.name and
obj.className='XWiki.ArticleClass' and prop.id.id=obj.id and
prop.name='author' and prop.value='XWiki.GEVERITT'")
<p>$sql</p>
#set($results =$xwiki.search($sql, 30, 0))
#set($arrayresults  = $results.toArray())

  #foreach($res in $results)
    <p>$res</p>
  #end

but I don't understand how to specify the name of author - Help.
-- 
View this message in context: 
http://www.nabble.com/distict-blog-authors-tp17367672p17372634.html
Sent from the XWiki- Dev mailing list archive at Nabble.com.

_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to