Joined: Tue Jun 20, 2006 2:16 pm Posts: 1
|
version 3.1.1
Database is DB2 v7
I have an externalized named query as shown below…
-->
<query name="findSResTslByDatCrtItl">
<!-- obtain records for proceeding resources -->
<![CDATA[
from
SResTsl as v
where
v.OrgItlId = :initials
and
v.ResCgyCd in (:set)
and
:date between v.RcuBgnEffDt and v.RcuEndEffDt
]]>
</query>
When I run this now, I get an 6/20/06 10:28:38:734 PDT] 1c491c49 SystemErr R org.hibernate.hql.ast.QuerySyntaxException: unexpected end of subtree [
I’m sure this is due to the (:set) collection parameter being empty…
Question: can I modify the named query def to ignore the (null) set parameter when it occurs(?) or do I have to ensure a non-null collection in the code.
I’ve heard a reference to something called “escaping” which can be done in the EQ..
Best Regards and TIA
_________________ Michael Dean
Senior Java Programmer
Information Services Division/Application Development Section/CAPS Maintenance
Administrative Office of the Courts
360.704.4008
Michael.Dean@courts.wa.gov
|
|