Thanks for the advice.
I checked it out and the maximimum size for the iSeries DB2 sql statement is 32k- We don't get anywhere near that.
I have produced some debug traces and discovered that with the version that works (i.e using setParameter) the hibernate QueryTranslator goes through the compile query step.
The old version with a mixture of setString and setParameter does not appear to use this step..............????
Working code
09:23:34,530 DEBUG SessionImpl:1519 - iterate: from uk.co.ltf.ltas.custinter.dao.ASMobileWorkOrder as amsl where D4OZCD= :supCustCode and D4WNS3 in (:status0_, :status1_) and D4WFS3 in (:priority0_, :priority1_, :priority2_) and D4SCC2= :asStationCode and D4SOC2 !=:mobile
09:23:34,530 DEBUG QueryParameters:108 - named parameters: {priority2_=3, mobile= , asStationCode=LGW, supCustCode=2388, priority0_=1, status0_=20, priority1_=2, status1_=30}
09:23:34,540 DEBUG QueryTranslator:147 - compiling query
09:23:34,550 DEBUG QueryTranslator:199 - HQL: from uk.co.ltf.ltas.custinter.dao.ASMobileWorkOrder as amsl where D4OZCD= :supCustCode and D4WNS3 in (:status0_, :status1_) and D4WFS3 in (:priority0_, :priority1_, :priority2_) and D4SCC2= :asStationCode and D4SOC2 !=:mobile
09:23:34,550 DEBUG QueryTranslator:200 - SQL: select asmobilewo0_.D4SQC2 as x0_0_, asmobilewo0_.D4OZCD as x0_1_ from LTRAPF.TKD4CPP asmobilewo0_ where (D4OZCD=? )and(D4WNS3 in(? , ?))and(D4WFS3 in(? , ? , ?))and(D4SCC2=? )and(D4SOC2!=? )
09:23:34,550 DEBUG BatcherImpl:192 - about to open: 0 open PreparedStatements, 0 open ResultSets
Problem code
09:01:10,381 DEBUG SessionImpl:1519 - iterate: from uk.co.ltf.ltas.custinter.dao.ASMobileWorkOrder as amsl where D4OZCD= :supCustCode and D4WNS3 in (:status0_, :status1_) and D4WFS3 in (:priority0_, :priority1_, :priority2_) and D4SCC2= :asStationCode and D4SOC2 !=:mobile
09:01:10,401 DEBUG QueryParameters:108 - named parameters: {priority2_=3, mobile= , asStationCode=LGW, supCustCode=2388, priority0_=1, status0_=20, priority1_=2, status1_=30}
09:01:10,401 DEBUG QueryTranslator:199 - HQL: from uk.co.ltf.ltas.custinter.dao.ASMobileWorkOrder as amsl where D4OZCD= :supCustCode and D4WNS3 in (:status0_, :status1_) and D4WFS3 in (:priority0_, :priority1_, :priority2_) and D4SCC2= :asStationCode and D4SOC2 !=:mobile
09:01:10,401 DEBUG QueryTranslator:200 - SQL: select asmobilewo0_.D4SQC2 as x0_0_, asmobilewo0_.D4OZCD as x0_1_ from LTRAPF.TKD4CPP asmobilewo0_ where (D4OZCD=? )and(D4WNS3 in(? , ?))and(D4WFS3 in(? , ? , ?))and(D4SCC2=? )and(D4SOC2!=? )
09:01:10,411 DEBUG BatcherImpl:192 - about to open: 0 open PreparedStatements, 0 open ResultSets
Would be nice to know why
thank you
|