cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <and...@objectstyle.org>
Subject Re: Problems with MySql id type with AUTO_INCREMENT
Date Tue, 29 Aug 2006 13:35:02 GMT
I'd appreciate that.

Andrus


On Aug 29, 2006, at 5:31 PM, Tobias SCHOESSLER wrote:

> ok, I got it. You want me to add a Jira entry for this? I never did  
> this
> before ... : |
>
>
>
>
>
>
>              Andrus Adamchik
>              <andrus@objectsty
>               
> le.org>                                                    To
>                                        cayenne- 
> user@incubator.apache.org
>              Tuesday,  
> 29                                                cc
>              August 2006 15:19
>                                                                     
> Subject
>                                        Re: Problems with MySql id type
>              Please respond to         with AUTO_INCREMENT
>              cayenne-user@incu
>              bator.apache.org
>
>
>
>
>
>
>
>
>
> On Aug 29, 2006, at 4:16 PM, Tobias SCHOESSLER wrote:
>
>> But still you are right there is a bug in mysql too. If the column
>> type is
>> INT and not INT UNSIGNED it should return java.lang.Integer but it
>> returns
>> java.lang.Long instead. This was my first observation.
>
> Still probably worth fixing the mapping to follow the docs.
>
>
>> but why does cayenne need BIGINT mapping set for the column to
>> retrieve it
>> as a java.lang.Long? I understand that this is unrelated to the bug
>> in the
>> mysql jdbc driver mentioned above.
>
> This is simply a workaround for the bug. BIGINT has a default JDBC
> mapping to java.lang.Long. So this consistently produced a Long
> during select and when reading auto-incremented value via JDBC.
>
> Andrus
>
>
>


Mime
View raw message