A couple of options:
1) use resultMap instead of resultClass
2) use a bean instead of a Map
Using resultClass=Map, you get whatever JDBC sends back - which in
this case is a BigInteger.
My vote would be to use both a bean and a result map - the behavior is
much more predictable, and you'll get slightly better performance.
Larry
On 8/30/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Hi there!
>
> I have a queryForMap like this:
>
> HashMap codes = (HashMap)
> sqlMap.queryForMap("retrieveAdminUserAccessCodes",
> "testUser", "CODE", "VALUE"));
>
> And the query like this:
>
> <select id="retrieveAdminUserAccessCodes"
> resultClass="java.util.HashMap" parameterClass="String">
> select
> CODE,
> VALUE
> from ADMINUSERACCESS
> where ADMINUSERNAME = #value#
> </select>
>
>
> VALUE is NUMBER(5) in a Oracle 9.2 database, when I get it back, codes,
> the VALUE part is of type BigDecimal, is it possible to get it as an Integer
> instead ? hmm
>
> Or is it other ways to do this in a better way ?
>
>
> Thanks!
> Erlend