-->
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.  [ 4 posts ] 
Author Message
 Post subject: Accessing postgresql db
PostPosted: Mon Sep 19, 2005 1:33 am 
Hello,
first of all, i have created a database in postgresql, and accessing through the hibernate,
for the database of 20+ tables, i use one indexing number.

Will that gives any preformance problem if so , how can i over come it?


and i'm try to create a second database, and try to access it via hibernate as well, how could i able to access the new database via hibernate as well as the one i created before, and are they both going to use the same indexing value?


Top
  
 
 Post subject:
PostPosted: Mon Sep 19, 2005 6:44 am 
Beginner
Beginner

Joined: Mon Apr 12, 2004 6:33 pm
Posts: 35
What do you mean by "indexing number"? A sequence?

_________________
Kees de Kooter

(don't hesitate to rate ;)


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 19, 2005 7:57 pm 
yep the sequence.


Top
  
 
 Post subject:
PostPosted: Mon Sep 19, 2005 11:51 pm 
Beginner
Beginner

Joined: Mon Apr 12, 2004 6:33 pm
Posts: 35
OK. Using a sequence for multiple tables is not a problem. You only have to make sure you size it properly so you dont't run out of sequence numbers.

For a second database you need to create a second sessionfactory. I am afraid if you want to use the same sequence you have to create your own generator by implementing the org.hibernate.id.IdentifierGenerator interface, or use the assigned type.

_________________
Kees de Kooter

(don't hesitate to rate ;)


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.