-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Accessing the 'native' id generator
PostPosted: Tue Feb 27, 2007 3:07 am 
Newbie

Joined: Sun Feb 13, 2005 11:48 pm
Posts: 4
Location: Sydney, Australia
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.