[hibernate-dev] Sequence Pool

Janario Oliveira janarioliver at gmail.com
Mon Feb 9 09:39:22 EST 2015

Hi guys,

I am migrating some code base and I have some problems using sequence.
As I see it works with a pool together to allocationSize. But it expects
that the sequence have the same increment by (50 as default).

Is there a global configuration that disable pool and always read from the

In my case scripts are generated manually and everyone will have to
remember to add increment by 50 or allocationSize = 1.

Also this would change order creation vs order id.
If I create 2 rows with hibernate it will keep pooling from 1 to 50. (id 1
and 2)
After that some procedure or script can create another one with nextval of
the sequence. (id 51)
Next hibernate create another row. (id 3)

The right order of creation is: 1, 2, 51, 3
But ordering by id will load a wrong order.

More information about the hibernate-dev mailing list