|
Using oracle sequences for ids, hibernate starts from current value of sequence, goes up to current value + 50 ( default range) and then gets the next value which is already used in the first batch.
What hibernate 4.3.9 did was start from (currentVal * 50) and go up to (current val * 50 + 49) and then get nextVal.
sample data base:
create table test_entity (id number(*,0), random_string varchar2(200 char)); create sequence test_entity_id_seq;
the attached code works on hibernate 4.* but not on 5.0.0, 5.0.1, 5.0.2
|