Hi, Why can't you use a sequence? Sure, there might be a gap if the process is killed (or on power failure), but is that really a problem for you? Why? You will anyway have gaps if you ever remove entries.
A patch for H2 would be nice! The best solution in my view (but probably also the most complex to implement) is the "returning" clause of PostgreSQL: http://www.postgresql.org/docs/8.2/static/sql-insert.html - it would require a change in how executeUpdate works: it would return a result set. Regards, Thomas On Thu, Jul 3, 2014 at 9:40 AM, Lukas <[email protected]> wrote: > Could I change this behavior with a plugin or any customization? > > > On Thursday, July 3, 2014 9:13:42 AM UTC+2, Noel Grandin wrote: >> >> >> >> On 2014-07-02 04:36 PM, Lukas wrote: >> > >> > Is it possible, that H2 only returns keys of columns that are >> initialized with "id bigint auto-increment" and not of >> > columns with "id bigint NOT NULL" values? >> > >> >> Correct. Specifically, since H2 is not generating the key in this case, >> there is nothing for us to return. >> > -- > 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. > For more options, visit https://groups.google.com/d/optout. > -- 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. For more options, visit https://groups.google.com/d/optout.
