Skip to content
Snippets Groups Projects
Commit 13c0a2eb authored by Manuel Leduc's avatar Manuel Leduc
Browse files

XWIKI-21786: The Live Data table in XWik.XWikiClasses (Data types page) shows...

XWIKI-21786: The Live Data table in XWik.XWikiClasses (Data types page) shows an incorrect number of pages
parent 631a57af
No related branches found
No related tags found
No related merge requests found
...@@ -50,7 +50,10 @@ ...@@ -50,7 +50,10 @@
#foreach ($row in $output.rows) #foreach ($row in $output.rows)
#set ($statement = ', BaseObject as obj where doc.translation = 0 and ' + #set ($statement = ', BaseObject as obj where doc.translation = 0 and ' +
'doc.fullName = obj.name and obj.className = :className') 'doc.fullName = obj.name and obj.className = :className')
#set ($row.pageCount = $services.query.hql($statement).bindValue('className', $row.doc_fullName).count()) ## Note: the unique filter is required as otherwise pages are returned once for each contained XObjects, leading
## to larger counts than expected.
#set ($hqlQuery = $services.query.hql($statement).bindValue('className', $row.doc_fullName).addFilter('unique'))
#set ($row.pageCount = $hqlQuery.count())
#end #end
#jsonResponse($output) #jsonResponse($output)
#end #end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment