Hibernate version: 3.2.2.ga
Hi,
I have had a look through the forum and tried to find an answer to my question, but have failed thus far (I am thinking that it may not be possible, but I should at least ask).
The application I am currently working on is implemented using native for id generation. I had to create a custom database exporter and importer for the data stored. On re-import (after the database has been dropped and re-created), the sequence value is at 1 (since I am testing with PostgreSQL Hibernate is using sequences).
I think you can see where I am going here:
Is it possible to gain access at the abstracted level in Hibernate to get the current sequence value, and set this value?
Of course you could write custom SQL to access your database and gain access to the sequence, but we don't know the type of database we are using.
If I can't access the native sequence via hibernate, what other options do I have?
Best regards,
Justin
|