Hibernate/JPA throws ConstraintViolationException when a SequenceGenerator is used and the sequence generator is also used by some external application
Issue
- The
org.hibernate.id.enhanced.SequenceStyleGeneratorretrieves the sequence value thanks to anextvalcall and subtracts the JPAallocationSizein order to use range values from (nexval-allocationSize) tonexval. We would prefer the range to be from nexval to (nexval + allocationSize) instead.
Environment
- JBoss Enterprise Application Platform (EAP)
- 5
- 6
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.