When I run the following query in Java with a 
PreparedStatement.RETURN_GENERATED_KEYS flag no keys seem to be returned:

INSERT INTO table(id, another_primary_key) VALUES ((SELECT 
COALESCE(max(id)+1,1) FROM table),?) 

I don't use the JDBC connection with multiple thread as it is being 
suggested in other places several times to be the reason for such kinds of 
problems.
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?

-- 
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.

Reply via email to