The World’s Largest Online Community for Developers

'; java - Customization of Hibernate sequence generation - LavOzs.Com

I have one hibernate sequence, that generates all sequence-numbers in my app. When I generate the schemas from hibernate (target Oracle10), it genererates:

create sequence hibernate_sequence;

I would like to change the configuration of the sequence. I have to use something like:

create sequence hibernate_sequence order nocache;

I don't like to change the generated scripts, everytime I create them. Where can I customize the sequence generated by hibernate?

You can create a custom sequence generator. See for details.

How to generate a random alpha-numeric string?
Hibernate JPA Sequence (non-Id)
How do I generate random integers within a specific range in Java?
Can I add jars to maven 2 build classpath without installing them?
What are the possible values of the Hibernate configuration and what do they do
'Must Override a Superclass Method' Errors after importing a project into Eclipse
Custom sequence generator for Hibernate 5
Using hibernate sequence as general sequence in application