I'm initializing Hibernate without any XML by something like
org.hibernate.SessionFactory sessionFactory =
new org.hibernate.cfg.Configuration().
.setProperty(...)
.setProperty(...)
...
.buildSessionFactory();
My classes use an ID like
@Id @Generated(GenerationTime.INSERT) @GeneratedValue private Integer id;
The generator used is SequenceStyleGenerator, which seems to be the replacement for the deprecated SequenceGenerator and SequenceHiLoGenerator and whatever. It uses
public static final int DEFAULT_INCREMENT_SIZE = 1;
and seems to allow configuration via
public static final String INCREMENT_PARAM = "increment_size";
but that's all I could find out. I guess I have to set some property "xxx.yyy.increment_size" or pass it in another way to Hibernate, but I can't see how.
I'm aware of @SequenceGenerator, but it seems to be completely ignored


I guess you are looking for how to set
increment_sizeproperty for yourSequenceSytleGenerator.Sample snippet below setting
increment_sizeusing@GenericGeneratorannotation withhilooptimizer andSEQUENCEstrategy.There's no way you can globally set the
DEFAULT_INCREMENT_SIZEwith a Hibernate configuration property. You need to use the@Idconfiguration properties instead.