-->
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.  [ 6 posts ] 
Author Message
 Post subject: Design/Connection question ?
PostPosted: Mon Mar 22, 2004 6:24 pm 
Beginner
Beginner

Joined: Mon Mar 08, 2004 5:22 pm
Posts: 35
I have two questions:
1] I have two db instances on the same machines and i need to SELECT
ONE VIEW from each instance.
ex: machne1:masterf and machine2:masterfx
How do i configure that in hibernate.properties & keep them alive
through out the transaction ?

Keeping the both instances intact

Please help in the following scneario....

2] VIEW [PARENT called PLACE] has the following fileds
--------------------------------------------------
ID [UNIQUE]
NAME

VIEW [CHILD called PERSON] has the following fileds
--------------------------------------------------
AUCTION-ID[Can be compared against ID of the PARENT]
FIRSTNAME
LASTNAME
All the above fields are one composite key[COMPOSITE-ID]

CHILD component is working fine with COMPOSITE-ID
using HIBERNATE.

How do i relate both PARENT and CHILD ? What kind of mapping ?

Thanks for the help.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 23, 2004 11:11 am 
Beginner
Beginner

Joined: Mon Mar 08, 2004 5:22 pm
Posts: 35
can someone answer this please


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 23, 2004 11:15 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Your question doesn't make much sense. Hibernate uses two different SessionFactories, one for each database. There is no relationship in between, both use a distinct set of mappings and instances at runtime.

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 23, 2004 11:45 am 
Beginner
Beginner

Joined: Mon Mar 08, 2004 5:22 pm
Posts: 35
That is what i wanted to know. Does it make sense or not ?
Thank you for you logical explanation.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 23, 2004 11:51 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
It's just the way Hibernate deals with multiple databases, i.e. there is no relationship between a JDBC connection to an Oracle database and another JDBC connection to a PostgreSQL database. I don't understand what you are trying to do with your views, however, so we might talk about different things.

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 23, 2004 12:10 pm 
Beginner
Beginner

Joined: Mon Mar 08, 2004 5:22 pm
Posts: 35
I have the parent view on one instance[test area] and child on another[production area]. Once i could complete the relation [with mappings etc], the db team wants to create parent view on production too. Now i understand it is not right, since i cant make relation with two different instances. Your explanation helped me to express myself strongly to the db team. I will ask them to create the parent view also on the production. Now this seems confortable to me since i have some explanation for the problem.


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