ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Hurst" <jbhu...@attglobal.net>
Subject RE: Feature of resultset.getGeneratedKeys
Date Wed, 02 Nov 2005 07:41:38 GMT
I don't know if the question is just for MySQL, but in my tests of Firebird
with the Jaybird driver I found that it screws this up.

That is, if you do

	SELECT GEN_ID(gen_song, 1) FROM rdb$database  -- increments

And then later in the same thread with the same Connection:

	SELECT GEN_ID(gen_song, 0) FROM rdb$database -- gets current

You can get a different answer!

I found this disappointing.  I believe the Firebird doc states or at least
hints that this is the behavior, but I cannot find the reference just now.

Regards

John Hurst 
Wellington
> -----Original Message-----
> From: larry.meadors@gmail.com [mailto:larry.meadors@gmail.com] On Behalf
> Of Larry Meadors
> Sent: Wednesday, 2 November 2005 18:53
> To: user-java@ibatis.apache.org
> Subject: Re: Feature of resultset.getGeneratedKeys
> 
> 1) Nope.
> 
> 2) Depends on the driver, but in every case I have seen, no.
> 
> Larry
> 
> 
> On 11/1/05, Tat Leong Chong <tlchong123@yahoo.com> wrote:
> > Hi,
> >
> > I am new to Ibatis and using MySQL for company
> > MIS development. We found the new feature in JDK1.5
> > for getGeneratedKeys.
> >
> > 1. I am curious that is the current version 2.1.5
> > Ibatis already support this feature instead of using
> > the <selectKey> Select LAST_INSERT_ID() as id
> > </selectKey>?
> >
> > 2. In the current version of IBATIS, <selectKey>
> > Select LAST_INSERT_ID() as id </selectKey> to get the
> > auto-increment key. Would this have any problem in
> > many user access environment like the key is taken by
> > other thread?
> >
> > Thanks.
> >
> > Regards,
> > Tat
> >
> >
> >
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam? Yahoo! Mail has the best spam protection around
> > http://mail.yahoo.com


Mime
View raw message