Hi Ricardo

You are only checking in one object. So there has to be one object that
contains the doc name, but not the withdrawal part which is fulfilled by
the third object in your example. Whilst I don't recall ever having tried
checking for multiple objects in XWQL, I would suspect this should work:

#set ($xwlquery1 = "from doc.object(XWiki.XWikiComments) as comm1,
doc.object(XWiki.XWikiComments) as comm2 where doc.translation = 0 and
comm1.comment like '%$doc.title%' and comm2.comment not like
'%Withdrawal:2011%'")

Hope this helps
Edo


On Wed, May 22, 2013 at 2:57 AM, <
ricardo.julio.rodriguez.fernan...@sergas.es> wrote:

> Hi!,
>
> I'm really impressed, again, with the performance and easiness of XWQL.
> Even though I'm using an old XWiki release, I'm able to follow almost all
> examples provided at...
>
> http://extensions.xwiki.org/xwiki/bin/view/Extension/Query+Module
>
> But I'm not able to figure out how to solve one problem: I would like to
> retrieve documents (and read their properties) based on a combination of
> values of comments objects. That is: I only want to retrieve a document
> when a combination of values stored in comments happens.
>
> I've tried this...
>
> #set ($xwlquery1 = "from doc.object(XWiki.XWikiComments) as comm where
> doc.translation = 0 and comm.comment like '%$doc.title%' and comm.comment
> not like '%Withdrawal:2011%'")
>
> But this query retrieve also, for instance, this document holding three
> comments:
>
> Ricardo Rodríguez Fernández, 2012/06/15 07:49
> Reply Edit Delete
> Gender:male
>
> Yolanda Liste Martínez, 2012/06/15 09:18
> Reply Delete
> Withdrawal:20111231
>
> Ricardo Rodríguez Fernández, 2013/05/21 13:24
> Reply Edit Delete
> Formely:XWiki.XWikiIDISE001
>
> I'm not able to find a way of not to retrieve this document while all
> others with comm.comment like '%$doc.title%'.
>
> Please, could anybody help me with this issue?
>
> Thank you so much for your help,
>
> Ricardo
>
>
> --
> Ricardo Rodríguez
> Research Management and Promotion Technician
> Technical Secretariat
> Health Research Institute of Santiago de Compostela (IDIS)
> http://www.idisantiago.es
>
> Nota: A información contida nesta mensaxe e os seus posibles documentos
> adxuntos é privada e confidencial e está dirixida únicamente ó seu
> destinatario/a. Se vostede non é o/a destinatario/a orixinal desta mensaxe,
> por favor elimínea. A distribución ou copia desta mensaxe non está
> autorizada.
>
> Nota: La información contenida en este mensaje y sus posibles documentos
> adjuntos es privada y confidencial y está dirigida únicamente a su
> destinatario/a. Si usted no es el/la destinatario/a original de este
> mensaje, por favor elimínelo. La distribución o copia de este mensaje no
> está autorizada.
>
> See more languages: http://www.sergas.es/aviso_confidencialidad.htm
> _______________________________________________
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
>
_______________________________________________
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to