Optionally provide an id explicitly when using a sequence generator with Hibernate
Issue
- Need to provide an identifier explicitly for certain entities (e.g. when testing)
- For other entities of the same type, need the identifier to be sequence generated (e.g. in production)
- Will use lower values than the sequence base for explicitly provided identifiers
Environment
- Red Hat JBoss Enterprise Application Platform (EAP) 5
- Hibernate 3
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.
