Using join prop.list list for the main query allows to add a where not in: #set($sql = "select distinct list from BaseObject as obj, DBStringListProperty as prop join prop.list list where obj.className='XWiki.TagClass' and obj.id=prop.id.id and prop.id.name='tags' and obj.name in (select obj1.name from BaseObject as obj1, DBStringListProperty as prop1 join prop1.list list1 where obj1.id=prop1.id.id and prop1.id.name='tags' and list1 = 'KB-4D') and list not like 'KB%')") #set ($tags = $xwiki.search($sql)) $tags Ludovic Bruno Neves wrote:
Thank you so much so far
I tagged three pages with this set of tags 1.º page: PRINT|KB-4D 2.º page: ARQUIVO|KB-FRAMEWORK 3.º page: PERSISTENCE|KB-FRAMEWORK|KB-4D
After run the query you wrote I get the expected result: - KB-4D - KB-FRAMEWORK - PERSISTENCE - PRINT
I tried to integrate a criteria expression "not like 'KB-%' in the query to filter the first two tags (KB-4D, KB-FRAMEWORK) useless for the final porpose (select all the subjects of a knowledge base) but without sucess.
Can you help me in this?
The main reason that keeps me far from my objective is not understand the mapping of XWiki database or how it's implemented. Can you give some information or documents you already have?
Than you again and best regards Bruno Neves
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Ludovic Dubost Blog: http://blog.ludovic.org/ XWiki: http://www.xwiki.com Skype: ldubost GTalk: ldubost