In Hibernate 4.x, specifically 4.3.11, all worked as expected.
4.x generated SQL
In 5.x the DB structure has changed in incompatible ways.
5.x generated SQL
I have confirmed the dialect values are sensible. The error seems to be inside / around the SessionFactoryImpl's identifierGenerators. While the dialect indicates Identity generation, the generator seems to be a result of DefaultIdentifierGeneratorFactory, which produces sequence based ids.
Specifically the metadata.getEntityBindings() returns a PersistentClass model where the identifier is a SimpleValue whose identifierGenerator is a SequenceStyleGenerator.
This can be backtracked to:
This is not related to:
Java 7, Java 8, h2-1.4.200.jar
This may be a change in “design” ut not easily identified in the change logs - quoting https://docs.jboss.org/hibernate/orm/5.0/userguide/html_single/Hibernate_User_Guide.html#identifiers-generators :
The discussions below assume that the application is using Hibernate’s "new generator mappings" as indicated by the hibernate.id.new_generator_mappings setting or MetadataBuilder.enableNewIdentifierGeneratorSupport method during bootstrap. Starting with Hibernate 5, this is set to true by default. If applications set this to false the resolutions discussed here will be very different. The rest of the discussion here assumes this setting is enabled (true).