我怎么能创建一个我的课上autoScreded从零到255的领域

在JPA I上创建序列通常使用此@GeneratedValue(strategy = GenerationType.AUTO)@SequenceGenerator(name =“example_sequence”,sequenceName =“example_sequence”)

但是我想创建一个也是自动生成的序列,但它从0增加到255,当这个值达到时,它从零开始


您将需要创建自己的序列生成器

http://www.objectdb.com/api/java/jpa/SequenceGenerator

http://openjpa.apache.org/builds/1.1.0/docs/jpa_overview_mapping_sequence.html

http://blog.cyclopsgroup.org/2007/04/custom-idgenerator-for-jpa-gap-between.html

链接地址: http://www.djcxy.com/p/90889.html

上一篇: How can a I create an field on my class thats autoIncremented from zero to 255

下一篇: System call that shows processes filtered by their status