My application is using JPA for persisting data to Database. The application has to generate Custom(encoded) sequence for performance reasons. By default JPA seems to generate Ids for an entity using some sequence.
How to override default sequence generator with customer sequence generator in Java ? I want to have sequence generator in Java as I have a separate logic for that.
This is how you go with the custom sequence:
In this case it will use
pet_sequenceinstead of the default one. Also you can read this article for a better understanding of this subject.