ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gwyn Evans" <gwyn.ev...@gmail.com>
Subject Re: query multiple column with Integer resultClass successfully executed
Date Thu, 03 Aug 2006 09:44:49 GMT
Well, from my reading of the docs, that's the expected behaviour (see
the "Result Maps/Primitive Results" section of the document).  If
using "int" by design, the only bug would be using something
generating more than 1 property.


On 03/08/06, Yusuf <Yusuf@ekalife.co.id> wrote:
> Hi, just stumbled across this, and thought i'd mention it here :
> i have a query like this
> <select id="selectDummy" parameterClass="string" resultClass="int">
>         SELECT colA, colB, colC FROM table1 WHERE colB = #value#
> </select>
> if you noticed, i mistakenly set the resultClass as an Integer although
> the query returns more than 1 column.
> The data in column colA is VARCHAR, but contains numerical values like
> '01200601', '01200602', and so on..
> as a result, the query executed successfully without any exception, and
> resulted in a List of Integers with values like 1200601, 1200602, and so
> on.. out of curiosity, is this just a bug? or is it made like that? I'm
> using iBATIS 2.1.7 and Oracle 8i..
> thanks..
> Yusuf

View raw message