Today I had tried a few times with hibernate using oracle sequence ID. The params of the generator was not very clear from documentations. But after a few permutation, it turns out this works nicely.
<id name=”file_id” type=”long” column=”file_id”>
<generator class=”sequence” />
This requires pre-generation of file_seq_id sequence in oracle database. It is also good for cluster
use. Increment type is not.