ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David McReynolds" <david.mcreyno...@gmail.com>
Subject Re: unsigned bigint
Date Sat, 17 Jan 2009 20:43:17 GMT
Judging from the exception the driver is throwing, I don't think either is
possible. Remember, Java doesn't do unsigned. All the JDBC driver seems to
know is that its a BIGINT. It has no concept of UNSIGNED BIGINT.

On Fri, Jan 16, 2009 at 1:27 PM, Jeff Butler <jeffgbutler@gmail.com> wrote:

> Assuming you are using MySQL...
>
> Connector/J documentation states that you should use
> ResultSet.getObject(), and then cast to java.math.BigInteger.
>
> So in iBATIS, you should set your bean property type to Object, and
> then cast it to BigInteger after the result is returned from iBATIS.
> Or, you could create a type handler that would do this within the
> iBATIS processing.
>
> Jeff Butler
>
>
> On Fri, Jan 16, 2009 at 2:52 AM, Ingmar Lötzsch
> <iloetzsch@asci-systemhaus.de> wrote:
> >> Anyone run into mapping an unsigned BIGINT? I don't see how its possible
> >> in Java?
> >
> > Why can't you use Long or long?
> >
>



-- 
--
dlm

Mime
View raw message