That is really freaky - iBATIS usually has really good error messages.
I use ibatis+Oracle+date and everything plays well together. Here are some things to try if you do not want to attach a debugger... Is that column returning null? Try removing that column, does it work then? Also, try making the bean type for that column Object and see what iBATIS *wants* to put in there. Larry On 11/3/06, Rutherford, Matthew [CIB-IT] <[EMAIL PROTECTED]> wrote:
Unfortunately, I tried this but no luck. Also set jdbcType="TIMESTAMP" on the positionAsAt result tag too but nothing gained. Again, a dumb select all items query works fine for me, just not the slightly more complex query below... -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Larry Meadors Sent: 03 November 2006 15:14 To: [email protected] Subject: Re: Ibatis not returning any results Oh, position_as_at is a date? If so, then yeah: Removing the to_char should fix it up. Larry On 11/3/06, Rutherford, Matthew [CIB-IT] <[EMAIL PROTECTED]> wrote: > I think you've hit the nail on the head Larry, it's not being parsed into java.sql.Date correctly as a result of the to_char. > > thanks > Matt > > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf > Of Larry Meadors > Sent: 03 November 2006 14:53 > To: [email protected]; Graeme J Sweeney > Subject: Re: Ibatis not returning any results > > > What is returned by to_char(max(position_as_at))? > > Larry > > > On 11/3/06, Graeme J Sweeney <[EMAIL PROTECTED]> wrote: > > On Fri, 3 Nov 2006, Rutherford, Matthew [CIB-IT] wrote: > > > > > The java property is of type int. ie. setFii(2) sets it to an int value 2. In the db it is an oracle number(12). > > > > > > If I do a getItems (select *) type query The list is populated fine. > > > > > > Any ideas? > > > > what happens if you hardcode the value of fii ? > > > > <select id="getLatestPositionByFii" resultMap="result"> > > SELECT id,currency_code,fii, to_char(max(position_as_at)), pos > > FROM item > > WHERE fii = 2 and pos != 0 > > GROUP BY id,currency_code,fii,pos > > </select> > > > > -- > > Graeme - > > >
