|
From: Ken K. <kk...@kk...> - 2003-05-27 17:11:53
|
Resending this message. I sent it last night and don't know why it hasn't shown up on the mailing list. Isabelle, I have used your new mysql key generation in petclinic and it works fine. By the way, I like this new interface much better than the old one using the KeyBinder and JdbcTemplate.InsertRetval. It is much cleaner and easier to use. Ken Isabelle Muszynski wrote: > Hi everyone, > > I've rewritten mySQL key generation (MySQLMaxValueIncrementer.java). > KeyBinder is no longer used. For a sample of how to use key > generation, have a look at livetest/JdbcInsertTestSuite.java. > > Your main table (the one for which you want key generation) should not > auto_increment its key. The sequence table, on the other hand, should > be auto_increment. Have a look at createTables in JdbcInsertTestSuite > or at the javadoc for MySQLMaxValueIncrementer.java. > > Please let me know if there still are problems. One of the tests is > for behavior when multithreading, and on my system it succeeds. > > Isabelle > > > |