Our existing legacy JBoss 7.1.1/Hibernate 4.0.1 JPA platform uses configuration setting hibernate.id.new_generator_mappings = true. A simple test uses a JPA native query to get sequence.nextval, then uses JPA to persist several new entities:
Our efforts to upgrade our platform to Wildfly 10.1.0/Hibernate 5.0.10 rely on the default (true) for configuration setting hibernate.id.new_generator_mappings. The identical test as above produces:
Our application test infrastructure allows multiple tests to execute simultaneously, so in the case where a Wildfly 10.1.0/Hibernate 5.0.10 test happens to run consecutively with a legacy application test, we get primary key collisions on the first/last values in the sequence allocations (50). |