Hi, Marius Dumitru Florea wrote: > On 10/14/2010 11:18 AM, [Ricardo Rodriguez] eBioTIC. wrote: > >> Marius Dumitru Florea wrote: >> >>> Hi Ricardo, >>> >>> On 10/14/2010 12:40 AM, [Ricardo Rodriguez] eBioTIC. wrote: >>> >>> >>>> Hi! >>>> >>>> Following http://platform.xwiki.org/xwiki/bin/view/DevGuide/QueryGuide >>>> and a lot of help from people on this list, I got working this query: >>>> >>>> #set($query = ", BaseObject as obj, StringProperty as prop where >>>> doc.fullName = obj.name and obj.className='Users.PdrUserClass' and >>>> obj.id=prop.id.id and prop.id.name='Type' and (prop.value like '" + >>>> $usertypeOne + "' or prop.value like '" + $usertypeTwo + "') order by >>>> doc.fullName asc") >>>> >>>> >>>> >>> >>>> I do need to add now another criteria with an *AND* operator querying a >>>> different property (Withdrawal) of the same class (User.PdrUserClass). >>>> >>>> >>> Is Withdrawal a StringProperty too? >>> >>> >> Yes. Thanks. >> > > I put a second example on > http://platform.xwiki.org/xwiki/bin/view/DevGuide/velocityHqlExamples#HGettingdocumentswhereobjects27propertiesequalssomevalue > > Does it help? > Marius > >
It helped a lot. Sorry for being late with this reply. What it still difficult to understand for me is how http://platform.xwiki.org/xwiki/bin/view/DevGuide/velocityHqlExamples#HNon-exhaustivelistofqueryableObjectFields can be completed as, for the best of my knowledge, this is a key point for people using, let's say, VTL to design templates. >>>> I'm miserably failing to construct this query; some of my attempts lead >>>> MySQL to eat 99% of the processor time use. >>>> >>>> Please, could you help me with this query? Thanks! >>>> >>>> Ricardo >>>> >>>> >>>> >>> _______________________________________________ >>> devs mailing list >>> [email protected] >>> http://lists.xwiki.org/mailman/listinfo/devs >>> >>> >>> > _______________________________________________ > devs mailing list > [email protected] > http://lists.xwiki.org/mailman/listinfo/devs > > -- Ricardo RodrÃguez CTO eBioTIC. Life Sciences, Data Modeling and Information Management Systems _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs

