From: gray <gra...@ma...> - 2010-04-27 13:02:32
|
Fred Toussi-2 wrote: > > With HSQLDB 1.8.x and later, you can use the SQL statement "CALL > IDENTITY()" after an INSERT that generates an IDENTITY column value. > This is per session so it is safe in a multiple connection scenario. > Yeah. I was worried about thread race conditions so pre-allocation is necessary. Fred Toussi-2 wrote: > > With HSQLDB 2.x, you can use the JDBC getGeneratedKey method. > I'm using repo1.maven.org which only has the 1.8.X versions. Fred Toussi-2 wrote: > > You can also retrieve it directly > > CALL NEXT VALUE FOR "generated_id_seq" > Excellent. I thought I had tried this and it didn't work. Works now though so I made the change. Thanks much for the help, gray -- View this message in context: http://old.nabble.com/added-hsqldb-support-to-ormlite-tp28370685p28376654.html Sent from the HSQLDB - User mailing list archive at Nabble.com. |