That's particularly aggravating if you have extended ID generation annotations such as
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "idGenerator") @GenericGenerator(name = "idGenerator", strategy = "org.hibernate.id.enhanced.SequenceStyleGenerator", parameters = { @Parameter(name = "sequence_name", value = "ID_SEQ"), @Parameter(name = "initial_value", value = "1"), @Parameter(name = "optimizer", value = "<some-PatchedPooledLoOptimizer>"), @Parameter(name = "increment_size", value = "1000") })
In this case you need to ensure that the "increment_size" is actually the same as in the DB sequence.
That's particularly aggravating if you have extended ID generation annotations such as
In this case you need to ensure that the "increment_size" is actually the same as in the DB sequence.