Hi!

Eugen Colesnicov wrote:
> Hi! Maybe somebody can help me.
>
> I need to select some docs with own class. Together I need 3 filters:
> 1) by class: only "myclass"
> 2) by property value: where "myproperty" = "myvalue"
> 3) by date: where doc date = current date - 5 days
> I created xwql script with 2 creterias and it's working well:
>
> select obj.name from Document doc, doc.object(mySpace.myClass) as obj where
> obj.myProperty like 'myValue' order by obj.name
>
> How need to add one more criteria by date?
>   

This query is working fine in a XE 1.3.8295 installation, but I'm using 
HQL though.

#set($query = ", BaseObject as obj, StringProperty as type, 
StringProperty as withdrawal where doc.fullName = obj.name and 
obj.className='Users.PdrUserClass' and obj.id=type.id.id and 
type.id.name='Type' and obj.id=withdrawal.id.id and 
withdrawal.id.name='Withdrawal' and (type.value like '%lonxa%' or 
type.value like '%xest%') and withdrawal.value ='non' and year(doc.date) 
= '2010' order by doc.fullName asc")

HTH,

Ricardo

-- 
Ricardo Rodríguez
CTO
eBioTIC.
Life Sciences, Data Modeling and Information Management Systems

_______________________________________________
users mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to