I reported this issue here: https://code.google.com/p/h2database/issues/detail?id=357
I work around this by taking a table lock, executing a batch update, then computing my auto-increment keys using the last value in the ResultSet. I hope to add this feature at some point and generally want to improve H2's MySQL compatibility since my employer uses H2 for unit testing. On Monday, March 11, 2013 11:20:21 AM UTC-7, Brice Dutheil wrote: > > We are using H2 with batches, and mybatis, but H2 driver only returns the > last key as documented in the source code. Using the BATCH mode, it would > be really useful to get all the ids that were inserted, especially if you > plan to use the ids in order to write other relations. > > Is it something that could be added to the roadmap, or is is too delicate > to introduce this feature in a foreseeable future. > > Cheers, > Brice > > -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/h2-database?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
