Sorry for the late reply. Things have moved on somewhat and the SQL has been refactored.
However, there's another problem for which I will start a new thread. But to answer your question. The list is a property of a Java HashMap; each instance in that list has three properties: 2 ints and a String. mukhi wrote: > > did you check the type of value you are passing to the list? you may be > passing string type values to the list. > > devver wrote: >> >> Thanks for the reply (sorry: managed to reply twice). It's IB v2. >> An older version of IB sounds feasibly yet we have sql maps that use >> similar constructs, i.e <isnull> nested within <iterate> elements and >> accessing properties on instances stored in maps. Most perculiar. I cant >> get it to work and will probably have to resort to tortuous SQL to get >> the results I need >> >> >> >> nmaves wrote: >>> >>> Which version are you using? It looks to be IB2 and if that is true I >>> would suggest to moving up to 3.x. >>> >>> On Mon, Apr 26, 2010 at 1:02 PM, devver <kmg...@googlemail.com> wrote: >>>> >>>> Hi >>>> >>>> I'm new to iBatis and I'm struggling to access a property of instances >>>> stor4ed in a list which, in turn are passed to ibatis in a HashMap >>>> parameter. The <iterate> clauses are building a WHERE clause, the >>>> contents >>>> of which will alter depending on whether this proeprty is null or not. >>>> >>>> I am iterating over my List as follows: >>>> >>>> <iterate prepend="AND" property="MyMap.myList" conjunction="AND" >>>> open="(" >>>> close=")"> >>>> ... >>>> </iterate> >>>> >>>> Within this I check the value of a property, 'myProperty' and complete >>>> the >>>> WHER clause accordingly. The iterate clause now looks like this: >>>> >>>> <iterate prepend="AND" property="MyMap.myList" conjunction="AND" >>>> open="(" >>>> close=")"> >>>> <isNull property="MyMap.myList[].myProperty"> >>>> <!-- code when property is NULL --> >>>> </isNull> >>>> <isNotNull property="MyMap.myList[].myProperty"> >>>> <!-- code when property is _not_ NULL --> >>>> </isNotNull> >>>> >>>> </iterate> >>>> >>>> When I run this, the error message seems to indicate that my syntax i >>>> nrelation to the List is incorrect:- >>>> >>>> --- Cause: com.ibatis.common.beans.ProbeException: Error getting >>>> ordinal >>>> list from JavaBean. Cause java.lang.NumberFormatException: For input >>>> string: >>>> "" >>>> Caused by: java.lang.NumberFormatException: For input string: ""; >>>> nested >>>> exception is com.ibatis.common.jdbc.exception.NestedSQLException: >>>> >>>> If anyone can shed any light as to what I've missed, here, I'd be >>>> grateful. >>>> >>>> Thanks >>>> >>>> >>>> -- >>>> View this message in context: >>>> http://old.nabble.com/Problem-accessing-List-instance-property-via-%3Cisnull%3E-tp28368852p28368852.html >>>> Sent from the iBATIS - User - Java mailing list archive at Nabble.com. >>>> >>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org >>>> For additional commands, e-mail: user-java-h...@ibatis.apache.org >>>> >>>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org >>> For additional commands, e-mail: user-java-h...@ibatis.apache.org >>> >>> >>> >> >> > > -- View this message in context: http://old.nabble.com/Problem-accessing-List-instance-property-via-%3Cisnull%3E-tp28368852p28451772.html Sent from the iBATIS - User - Java mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org For additional commands, e-mail: user-java-h...@ibatis.apache.org