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 of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
