Hi,
I'm experiencing problems using HibernateCursorItemReader and trying to add parameters to my queryName.
I thought I found a solution on the following thread : http://forum.springsource.org/showthread.php?t=73562
I tried the last solution but I got the following error :
My query :Code:org.hibernate.QueryException: unexpected char: '#' [
I add the parameters like that :Code:<query name="B_Auto"> <![CDATA[ From AutomateED a where a.dat < trunc(sysdate - 15/1440) and not exists (select 1 from EtatED e where e.autoED.idauto = a.idauto and e.compED.idcomp = #{jobParameters[idcomp]} and e.gravED.idgrav = #{jobParameters[idgrav]}) ]]></query>
I'm using Spring Batch 2.0.4.Code:JobParameters params = new JobParametersBuilder(). addLong("idcompagt", new Long(42)). addLong("idgraval", new Long(2)). toJobParameters(); setJobParameters(params);
Thanks in advance for your help.
Yann


Reply With Quote
