ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Larry Meadors <lmead...@apache.org>
Subject Re: mysql autoincrement zero value
Date Wed, 07 Dec 2005 18:13:53 GMT
Why are you inserting into an auto_increment field?

Larry


On 12/7/05, Leonardo Kenji Shikida <shikida@gmail.com> wrote:
> if I try to insert an object with id=0 into a mysql table that have an
> autoincrement id column, strange things happens
>
> mysql silently inserts that object with messy values. very dangerous.
>
> is there any workaround for this in mysql or ibatis? or will I have to
> check explictly for zeroed ids and throw an exception?
>
> []
>
> Kenji
> _______________________
> http://kenjiria.blogspot.com
> http://gaitabh.blogspot.com
>

Mime
View raw message