Sequence ID Values Incompatible During Upgrade

Description

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

Environment

Oracle 11.2 JBoss 7.1.1/Hibernate 4.0.1 upgrade to Wildfly 10.1.0/Hibernate 5.0.10

Activity

Show:
John Saccoccio
January 18, 2017, 9:23 PM

I stripped all non-JPA entity logic out of the evaluation - Cold start server, Arquillian test deploy, create 55 entities.

Assignee

Unassigned

Reporter

John Saccoccio

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Major
Configure