[h2] Re: generated keys are "cleared" inside of Session during INSERT (to the table with AUTOINCREMENT column) when there is a trigger (Java code, obviously) that does another INSERT (to different tab

2019-06-13 Thread Evgenij Ryazanov
Hello. No, it's not a TODO. It's a comment why the conditions below are necessary. Nested DML commands weren't not supported. However, the current implementation is entirely different and hypothetically it should work in your use case. You can build H2 from the sources and test it with your

[h2] generated keys are "cleared" inside of Session during INSERT (to the table with AUTOINCREMENT column) when there is a trigger (Java code, obviously) that does another INSERT (to different table w

2019-06-13 Thread Vitali
Autoincrement primary key column in H2 causes allocation of new value during execution of INSERT. Normally these values should be returned from Statement.getGeneratedKeys(). Somehow this API works fine with H2.196. In latest code some major refactoring was done using new class in H2 -