ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yusuf" <Yu...@ekalife.co.id>
Subject query multiple column with Integer resultClass successfully executed
Date Thu, 03 Aug 2006 09:28:22 GMT
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#

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

View raw message