posted 17 years ago
You can use curval instead of nextval if you don't want to waste a number. Also when you insert with Hibernate remember that that method call returns an object with its ID in it.
Basically, the ways to get the nextval from a sequence is the exact same with or without Hibernate. If I was in a stored procedure directory on Oracle, I would still need to do the exact same SQL from dual to get it without an actual insert statement.
Mark