-->
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: only a question about hibernate and several databases
PostPosted: Wed May 12, 2004 2:25 am 
Beginner
Beginner

Joined: Tue May 11, 2004 12:08 pm
Posts: 38
Location: Davis,CA,USA
Hi is it possible to link Hibernate with several databases and make a query over this databases?

used programm,

xdoclet 1.2
hibernate 2.1

databases
tamino
mysql
sapdb

thanx,

gert


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 12, 2004 3:17 am 
Regular
Regular

Joined: Wed May 12, 2004 3:03 am
Posts: 51
Location: France
Hi,

It is possible. The only thing you have to do is create to configure two sessions with two "hibernate.cfg.xml" files.

In each 'cfg.xml' you list the mapping files to consider and these files don't need to be the same. So, you can map the same classes with different schemas in one database or in different databases...

Bye,

Charles


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 12, 2004 3:35 am 
Beginner
Beginner

Joined: Tue May 11, 2004 12:08 pm
Posts: 38
Location: Davis,CA,USA
have I already said that hibernate is great?


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 12, 2004 8:19 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
You can however not maintain associations between objects in different databases, or query over two databases, etc.


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.