ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Larry Meadors" <lmead...@apache.org>
Subject Re: Ibatis not returning any results
Date Fri, 03 Nov 2006 13:03:44 GMT
What is the type of fii? It's not CHAR is it? Sometimes a CHAR will
mess things up because in the db it's ' A' instead of 'A' or 'A '...

Larry


On 11/3/06, Rutherford, Matthew [CIB-IT]
<matthew.rutherford@citigroup.com> wrote:
>
>
> Thanks for quick reply Marc, I have set parameterClass="Item" but no change,
> still no results returned...
>
> Matt
>
> -----Original Message-----
> From: Marc.Heimann@prolifics.de [mailto:Marc.Heimann@prolifics.de]
> Sent: 03 November 2006 11:36
> To: user-java@ibatis.apache.org
> Subject: Re: Ibatis not returning any results
>
>
> Looks like the parameterClass option is missing in the select.
>
> Cheers
> Marc
>
> "Rutherford, Matthew [CIB-IT]"
> <matthew.rutherford@citigroup.com> schrieb am 03.11.2006
> 12:15:14:
>
> > Hi I am using Ibatis SQL Maps 2.1.7
> >
> > Currently I have the following query in my SqlMapItemDao:
> >
> >
> getSqlMapClientTemplate().queryForList("getLatestItemByFii",
> item);
> >
> > The sql map looks like:
> >
> > <resultMap id="result" class="Item">
> >      <result property="Id" column="id" columnIndex="1"/>
> >      <result property="currencyCode" column="currency_code"
> columnIndex="2"/>
> >      <result property="fii" column="fii" columnIndex="3"/>
> >      <result property="positionAsAt" column="position_as_at"
> > columnIndex="4"/>
> >    <result property="pos" column="pos" columnIndex="5"/>
> > </resultMap>
> >
> > <select id="getLatestPositionByFii" resultMap="result">
> >     SELECT id,currency_code,fii, to_char(max(position_as_at)), pos
> >     FROM item
> >     WHERE fii = #fii# and pos != 0
> >     GROUP BY id,currency_code,fii,pos
> > </select>
> >
> > with sql debugging turned on, there is no error msg returned.
> >
> > If I try the same query in my sql client app I get 1 row of data
> > back.  But the queryForList() returns nothing to me, and I logged
> > the item object's variables to make sure it was the same parameter.
> > It is.  Why is the List not being populated with the same data?
> >
> > Thanks for any insight,
> > Matt
>

Mime
View raw message