Hi

i have an entity like
 <entity entity-name="EmplLeave"  
package-name="org.ofbiz.humanres.employment"    title="Employee Leave
Entity">
        <field name="partyId" type="id-ne"/>
        <field name="fromDate" type="date-time"/>
        <field name="thruDate" type="date-time"/>
        <prim-key field="partyId"/>
        <prim-key field="fromDate"/>
    </entity>

i want a sql query like this by delegator
SELECT * from empl_leave where party_Id=10411 and month(from_date)='4' and
year(from_date)='2010' ;(this is runnig on console)
but when i am trying this in java service
GenericValue emplLeave=(GenericValue)delegator.findByAndCache("EmplLeave",
UtilMisc.toMap("month(fromDate)", submitmonth,"year(fromDate)",submityear),
null);
(then exception is coming on server java.lang.ClassCastException:
javolution.util.FastList)
so please help me how to use sql methods in delegator.

Thanks in advance

Regards
Anurag Walia

-- 
View this message in context: 
http://n4.nabble.com/How-can-i-create-sql-query-using-delegator-tp1858040p1858040.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Reply via email to