-->
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.  [ 2 posts ] 
Author Message
 Post subject: Query on Native generator
PostPosted: Fri Feb 04, 2005 9:07 am 
Beginner
Beginner

Joined: Thu May 13, 2004 5:51 am
Posts: 28
Hibernate version:
2.1.3

If the mapping files uses a native generator and the database (Postgres 8.0) does not show any generated sequences, what are the other mechanisms in which a unique key is generated? I understand that hibernate chooses identity, sequence or hilo. But for a mapping file for entity foo, the table foo does not have a corresponding sequence generated. Nor are the generated ids identities. Wheres the logic for this generation?


--
Megha


Top
 Profile  
 
 Post subject: Re: Query on Native generator
PostPosted: Sat Feb 05, 2005 5:00 am 
Beginner
Beginner

Joined: Thu May 13, 2004 5:51 am
Posts: 28
mmesh wrote:
Hibernate version:
2.1.3
But for a mapping file for entity foo, the table foo does not have a corresponding sequence generated. Nor are the generated ids identities. Wheres the logic for this generation?


In fact there is a sequence generated termed 'hibernate_sequence'!

We recently shifted to Postgres from Mckoi. We used a third party utility Dbunit to migrate all our data. The shift was smooth but now we cant create new entities with postgres simply because the sequences were not migrated :-( and Mckoi used a mechanism called uniquekey(sequencename) to generate ids and postgres uses nextval(sequencename). Is there a way in which i can seamlessly sync up the two sequence values?

--
Megha


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

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.