-->
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: Filter caching
PostPosted: Thu Dec 09, 2010 2:30 pm 
Regular
Regular

Joined: Thu Aug 19, 2004 9:28 am
Posts: 63
Hi,

I'm migrating from 3.2.1 to 3.3.2 and encountered a weird situation.

I'm using a filter to which I'm passing 1 to 3 values.

Filter def.:
<filter-def name="roleCodeFilter">
<filter-param name="roleCodeFilterParam" type="integer"/>
</filter-def>

The Set def.:
<set name="applParticipation" inverse="true">
<key column="Appl_ID"/>
<one-to-many class="hibernate.ApplParticipation"/>
<filter name="roleCodeFilter" condition="Role_Code in (:roleCodeFilterParam)"/>
</set>

I enable the filter like this:
session.enableFilter("roleCodeFilter").setParameterList("roleCodeFilterParam", roleCodes);
Where the roleCodes is an array of course.

I sometimes pass 1 role code and sometimes I'm passing 3. What happen is,
if the first time I use the filter with 2 role codes, then every subsequent use
that passes a different number of role code will give me a an error like this:
(JDBCExceptionReporter.java:101) - JZ0SA: Prepared Statement: Input parameter not set, index: 2.

I do close each session and re-open between use of the filter.

Thanks for any help.


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.