Re: [xwiki-users] Please, badly need help with HQL...
Hi Sergiu, thank you so much for your help, the wanted pages query works fine if I use it for certain spaces: #set($sql= select link.fullName, link.link.id from XWikiLink link where link.fullName like 'MySpace.%' and not exists (select doc.fullName from XWikiDocument doc where doc.fullName = link.id.link) order by 1) #set($results= $xwiki.search($sql)) #if ($results.size() == 0) #warning('Es gibt keine gewünschte Seiten') #else {table} Space|Document|Link #foreach ($row in $results) #foreach ($col in $row) #if ($velocityCount==1) #set($docFullName=$col) #elseif ($velocityCount==2) #set($emptyLink=$col) #set($el=$emptyLink.getLink()) #set($spaceName=$xwiki.getDocument($docFullName).space) #end #end $spaceName|[$docFullName]|$el #end {table} #end Best Regards, Alla Sergiu Dumitriu-2 wrote: This should work: #set($query = select link.id.link from XWikiLink link where not exists (from XWikiDocument doc where doc.fullName = link.id.link)) #foreach($item in $xwiki.search($query)) * $item #end Note that several bad entries are placed there because the link detection process does not pre-run velocity, so lots of entries actually point to velocity variables or javascript code. Definitely the backlinks need to be revised in the new rendering. Sergiu Dumitriu http://purl.org/net/sergiu/ ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users -- View this message in context: http://n2.nabble.com/Please%2C-badly-need-help-with-HQL...-tp1493848p1499075.html Sent from the XWiki- Users mailing list archive at Nabble.com. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Please, badly need help with HQL...
Hi Adoro, One you have something fully working, would be nice if you could contribute this back on code.xwiki.org as a code snippet. Thanks -Vincent On Nov 14, 2008, at 4:58 PM, adoro wrote: Hi Sergiu, thank you so much for your help, the wanted pages query works fine if I use it for certain spaces: #set($sql= select link.fullName, link.link.id from XWikiLink link where link.fullName like 'MySpace.%' and not exists (select doc.fullName from XWikiDocument doc where doc.fullName = link.id.link) order by 1) #set($results= $xwiki.search($sql)) #if ($results.size() == 0) #warning('Es gibt keine gewünschte Seiten') #else {table} Space|Document|Link #foreach ($row in $results) #foreach ($col in $row) #if ($velocityCount==1) #set($docFullName=$col) #elseif ($velocityCount==2) #set($emptyLink=$col) #set($el=$emptyLink.getLink()) #set($spaceName=$xwiki.getDocument($docFullName).space) #end #end $spaceName|[$docFullName]|$el #end {table} #end Best Regards, Alla Sergiu Dumitriu-2 wrote: This should work: #set($query = select link.id.link from XWikiLink link where not exists (from XWikiDocument doc where doc.fullName = link.id.link)) #foreach($item in $xwiki.search($query)) * $item #end Note that several bad entries are placed there because the link detection process does not pre-run velocity, so lots of entries actually point to velocity variables or javascript code. Definitely the backlinks need to be revised in the new rendering. Sergiu Dumitriu http://purl.org/net/sergiu/ ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] Please, badly need help with HQL...
Hi all, Can someone help me? I need urgent two HQL queries: 1. Query for all wanted pages - pages that have been linked to, but are not yet written - new pages (links with the question mark next to them); 2. The version number of the document I restored/rolled back to. Thanks in advance, adoro -- View this message in context: http://n2.nabble.com/Please%2C-badly-need-help-with-HQL...-tp1493848p1493848.html Sent from the XWiki- Users mailing list archive at Nabble.com. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users