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.
|