-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: passing empty collections param to externalized named query
PostPosted: Tue Jun 20, 2006 2:25 pm 
Newbie

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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.