简体   繁体   English

自定义 Hibernate 序列生成

[英]Customization of Hibernate sequence generation

I have one hibernate sequence, that generates all sequence-numbers in my app.我有一个休眠序列,它在我的应用程序中生成所有序列号。 When I generate the schemas from hibernate (target Oracle10), it genererates:当我从休眠(目标 Oracle10)生成模式时,它生成:

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?在哪里可以自定义hibernate生成的序列?

You can create a custom sequence generator.您可以创建自定义序列生成器。 See http://www.hibernate.org/296.html for details.有关详细信息,请参阅http://www.hibernate.org/296.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM