I know how to set up hibernate for batch updates via the properties etc, but for batch inserts with sequences (using postgres sequence) it won't work because it has to fetch them.
I don't want to use the ranged id generator because I don't want holes, which there would likely be with many servers doing this.
So my thought is to just say screw it and use jdbc for this particular operation. I don't really need the objects in memory, I can reread them if needed, the main goal is on call to insert 20 instead of 20 calls.
Sound right? Or is there a preferred way to do this using hql?
|